{
  "title": "Form Spec",
  "description": "FormSpec defines an input/edit layout (Frontend §4).\n",
  "type": "object",
  "properties": {
    "actions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FormAction"
      }
    },
    "auth_action": {
      "description": "Bind submit to a platform auth action (mutually exclusive with entity).",
      "type": "string",
      "enum": [
        "login",
        "register",
        "change_password",
        "forgot_password",
        "reset_password"
      ]
    },
    "confirm": {
      "$ref": "#/$defs/FormConfirm",
      "description": "Confirm overrides the App-level confirm defaults for this form",
      "nullable": true
    },
    "context": {
      "description": "Context declares render-context variables injected into this form's",
      "type": "array",
      "items": {
        "$ref": "#/$defs/ContextDecl"
      }
    },
    "entity": {
      "description": "@schema {example: \"billing.order\"}",
      "type": "string",
      "examples": [
        "billing.order"
      ]
    },
    "mode": {
      "description": "@schema {example: \"edit\", enum: [\"create\", \"edit\", \"view\"]}",
      "type": "string",
      "enum": [
        "create",
        "edit",
        "view"
      ],
      "examples": [
        "edit"
      ]
    },
    "public": {
      "description": "If true (default), a route /module/form/\u003cname\u003e is auto-generated. Set false for embed-only forms.",
      "type": "boolean",
      "examples": [
        "true"
      ],
      "nullable": true
    },
    "render": {
      "$ref": "#/$defs/FormRenderDecl",
      "nullable": true
    },
    "sections": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FormSection"
      }
    },
    "submit": {
      "$ref": "#/$defs/FormSubmit",
      "nullable": true
    }
  },
  "required": [
    "entity"
  ],
  "additionalProperties": false
}