{
  "$schema": "http://json-schema.org/schema",
  "id": "NxAdspExpressService",
  "title": "Express ADSP Service",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the service.",
      "$default": {
        "$source": "argv",
        "index": 0
      },
      "x-prompt": "What name would you like to use?"
    },
    "env": {
      "type": "string",
      "description": "ADSP environment / access service to target: test = access-uat.alberta.ca (UAT — use for dev and pre-prod), prod = access.alberta.ca, dev = ADSP platform dev (restricted). Defaults to test.",
      "$default": {
        "$source": "argv",
        "index": 1
      },
      "alias": "e",
      "enum": ["test", "prod", "dev"],
      "default": "test"
    },
    "accessToken": {
      "type": "string",
      "description": "Access token for retrieving configuration from ADSP APIs.",
      "alias": "at"
    },
    "tenantRealm": {
      "type": "string",
      "description": "Keycloak realm UUID. Optional when --tenant is provided — overrides the realm looked up from the tenant service.",
      "alias": "tr"
    },
    "tenant": {
      "type": "string",
      "description": "ADSP tenant name. When provided, the realm is looked up anonymously and a single browser login is used instead of the full interactive flow.",
      "alias": "t"
    },
    "database": {
      "type": "string",
      "description": "Database to include in the service.",
      "default": "none",
      "enum": ["none", "postgres", "mongo"],
      "x-prompt": {
        "message": "Which database would you like to include?",
        "type": "list",
        "items": [
          {
            "value": "none",
            "label": "None — add a database later"
          },
          {
            "value": "postgres",
            "label": "PostgreSQL (Drizzle)"
          },
          {
            "value": "mongo",
            "label": "MongoDB (Mongoose)"
          }
        ]
      }
    },
    "skipAgent": {
      "type": "boolean",
      "description": "Skip the consultAgent interaction and generate base scaffolding only.",
      "default": false
    },
    "pairedProject": {
      "type": "string",
      "description": "Name of a frontend app project (vue-app, react-app, or angular-app) to pair with this service. When that frontend already exists in the workspace, the generator automatically wires its nginx proxy config, dev-server proxy file (vite.proxy.json or proxy.conf.json), serve target proxyConfig, and adsp:proxy-service: tag. Set automatically by composite generators (pevn, pern, pean, mern, mean) — also valid standalone when the frontend was scaffolded first."
    },
    "cors": {
      "type": "boolean",
      "description": "When true (default), CORS middleware is added — Access-Control-Allow-Origin: *. Set to false by full-stack composite generators whose service is paired with a frontend via a same-origin reverse proxy.",
      "default": true
    }
  },
  "required": ["name", "env"],
  "additionalProperties": false
}
