{
  "$schema": "http://json-schema.org/schema",
  "$id": "api-route-generator",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "API route name",
      "$default": {
        "$source": "argv",
        "index": 0
      },
      "x-prompt": "What is the api route name?",
      "default": "my-api-route"
    },
    "directory": {
      "type": "string",
      "description": "A directory where the API route will be placed ",
      "x-prompt": "What is the directory? (/api/<dirname>/<route>) e.g. auth, v1, textbooks, legacy",
      "default": ""
    },
    "wrapWithSentry": {
      "type": "boolean",
      "description": "Whether should wrap route with sentry",
      "x-prompt": "Wrap with sentry?",
      "default": true
    },
    "addCors": {
      "type": "boolean",
      "description": "Whether should add cors",
      "x-prompt": "Add cors options?",
      "default": false
    }
  },
  "required": ["name"]
}
