{
  "$schema": "http://json-schema.org/schema",
  "id": "NxAdspVueIntakeView",
  "title": "Vue Multi-Step Intake View",
  "description": "Generates a route-per-step intake wizard (Stepper + StepErrorSummary, a required read-only review step, and a confirmation page) into an existing vue-app project. Cross-step state is server-persisted -- each step PUTs/POSTs to /api/v1/<resource>/:id and refetches on mount; there's no client-side draft caching.",
  "type": "object",
  "properties": {
    "project": {
      "type": "string",
      "description": "The vue-app project to add the views to.",
      "$default": {
        "$source": "argv",
        "index": 0
      },
      "x-prompt": "Which project should the intake view be added to?"
    },
    "name": {
      "type": "string",
      "description": "Base name for the generated views, e.g. 'application' generates <Step>StepView.vue per step plus ApplicationReviewView.vue and ApplicationConfirmationView.vue.",
      "$default": {
        "$source": "argv",
        "index": 1
      },
      "x-prompt": "What should the intake flow be called?"
    },
    "resource": {
      "type": "string",
      "description": "API resource path segment. Each step fetches/saves /api/v1/<resource>/:id; the review step's Submit posts /api/v1/<resource>/:id/submit."
    },
    "route": {
      "type": "string",
      "description": "Base route, e.g. /applications. Steps become /applications/:id/<step-key>, plus /applications/:id/review and /applications/:id/confirmation. Start a new intake at /applications/new/<first-step-key>."
    },
    "steps": {
      "type": "string",
      "description": "JSON array of steps, in order -- e.g. '[{\"key\":\"personal-info\",\"label\":\"Personal information\",\"fields\":[{\"key\":\"fullName\",\"label\":\"Full name\"},{\"key\":\"born\",\"label\":\"Date of birth\",\"type\":\"date\"}]}]'. Each item: { key, label, fields: [...] }. Each field: { key, label, type?: \"text\"|\"textarea\"|\"number\"|\"date\"|\"select\" (default \"text\"), options?: [{value,label}] (select only, required for it), required?: boolean (default true) }. A number field is submitted as a number and a date as YYYY-MM-DD built from local calendar parts, not UTC. A plain array is also accepted when this generator is invoked programmatically. Nx's CLI option coercion only supports comma-separated primitive lists for array-typed schema properties, not JSON -- a JSON string is the only CLI syntax that survives Nx's own arg parsing."
    },
    "requiresAuth": {
      "type": "boolean",
      "description": "Whether the generated routes require authentication.",
      "default": true
    },
    "referenceField": {
      "type": "string",
      "description": "Field on the submitted record holding the business reference shown on the confirmation page, e.g. 'reference'. The confirmation fetches the record and displays this rather than the route id -- an internal id presented as a reference number is meaningless to the person quoting it back. Falls back to the route id when the record has no such field.",
      "default": "reference"
    },
    "heading": {
      "type": "string",
      "description": "Human title used in the confirmation heading, e.g. 'Compensation claim'. Defaults to the class-cased --name."
    }
  },
  "required": ["project", "name", "resource", "route", "steps"],
  "additionalProperties": false
}
