{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "allOf": [
    {
      "$ref": "https://json.schemastore.org/tsconfig#/definitions/compilerOptionsDefinition"
    },
    {
      "properties": {
        "controllerPathGlobs": {
          "description": "An array of path globs that point to your route controllers that you would like to have tsoa include.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "entryFile": {
          "description": "The entry point to your API",
          "type": "string"
        },
        "ignore": {
          "description": "Directories to ignore during TypeScript metadata scan",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "noImplicitAdditionalProperties": {
          "description": "Modes that allow you to prevent input data from entering into your API. This will document your decision in the swagger.yaml and it will turn on excess-property validation (at runtime) in your routes.",
          "enum": ["ignore", "silently-remove-extras", "throw-on-extras"],
          "type": "string"
        },
        "routes": {
          "$ref": "#/definitions/RoutesConfig",
          "description": "Route generation configuration object"
        },
        "spec": {
          "$ref": "#/definitions/SpecConfig",
          "description": "Swagger generation configuration object"
        }
      }
    }
  ],
  "definitions": {
    "RoutesConfig": {
      "properties": {
        "authenticationModule": {
          "description": "Authentication Module for express, hapi and koa",
          "type": "string"
        },
        "basePath": {
          "description": "Base API path; e.g. the '/v1' in https://myapi.com/v1",
          "type": "string"
        },
        "iocModule": {
          "description": "IOC module; e.g. './inversify/ioc' where IOC container named `iocContainer` is defined (https://github.com/inversify/InversifyJS)",
          "type": "string"
        },
        "middleware": {
          "description": "Middleware provider.",
          "enum": ["express", "hapi", "koa"],
          "type": "string"
        },
        "middlewareTemplate": {
          "description": "Override the Middleware template",
          "type": "string"
        },
        "routesDir": {
          "description": "Routes directory; generated routes.ts (which contains the generated code wiring up routes using middleware of choice) will be dropped here",
          "type": "string"
        },
        "routesFileName": {
          "description": "Routes filename; the filename of the generated route file ('routes.ts' by default)",
          "type": "string"
        }
      },
      "type": "object"
    },
    "SpecConfig": {
      "properties": {
        "basePath": {
          "description": "Base API path; e.g. the 'v1' in https://myapi.com/v1",
          "type": "string"
        },
        "contact": {
          "description": "Contact Information",
          "properties": {
            "email": {
              "default": "npm package author email",
              "description": "The email address of the contact person/organization.",
              "type": "string"
            },
            "name": {
              "default": "npm package author",
              "description": "The identifying name of the contact person/organization.",
              "type": "string"
            },
            "url": {
              "default": "npm package author url",
              "description": "API Info url\nThe URL pointing to the contact information.",
              "type": "string"
            }
          },
          "type": "object"
        },
        "description": {
          "description": "API description; defaults to npm package description",
          "type": "string"
        },
        "host": {
          "description": "API host, expressTemplate.g. localhost:3000 or myapi.com",
          "type": "string"
        },
        "license": {
          "description": "API license; defaults to npm package license",
          "type": "string"
        },
        "name": {
          "description": "API name; defaults to npm package name",
          "type": "string"
        },
        "outputDirectory": {
          "description": "Generated SwaggerConfig.json will output here",
          "type": "string"
        },
        "schemes": {
          "items": {
            "enum": ["http", "https", "ws", "wss"],
            "type": "string"
          },
          "type": "array"
        },
        "securityDefinitions": {
          "additionalProperties": {
            "anyOf": [
              {
                "$ref": "#/definitions/Swagger.BasicSecurity3"
              },
              {
                "$ref": "#/definitions/Swagger.BasicSecurity"
              },
              {
                "$ref": "#/definitions/Swagger.ApiKeySecurity"
              },
              {
                "$ref": "#/definitions/Swagger.OAuth2Security3"
              },
              {
                "$ref": "#/definitions/Swagger.OAuth2ImplicitSecurity"
              },
              {
                "$ref": "#/definitions/Swagger.OAuth2PasswordSecurity"
              },
              {
                "$ref": "#/definitions/Swagger.OAuth2ApplicationSecurity"
              },
              {
                "$ref": "#/definitions/Swagger.OAuth2AccessCodeSecurity"
              }
            ]
          },
          "description": "Security Definitions Object\nA declaration of the security schemes available to be used in the\nspecification. This does not enforce the security schemes on the operations\nand only serves to provide the relevant details for each scheme.",
          "type": "object"
        },
        "spec": {
          "description": "Extend generated swagger spec with this object\nNote that generated properties will always take precedence over what get specified here"
        },
        "specMerging": {
          "default": "'immediate'",
          "description": "Alter how the spec is merged to generated swagger spec.\nPossible values:\n  - 'immediate' is overriding top level elements only thus you can not append a new path or alter an existing value without erasing same level elements.\n  - 'recursive' proceed to a deep merge and will concat every branches or override or create new values if needed. @see https://www.npmjs.com/package/merge\n  - 'deepmerge' uses `deepmerge` to merge, which will concat object branches and concat arrays as well @see https://www.npmjs.com/package/deepmerge\nThe default is set to immediate so it is not breaking previous versions.",
          "enum": ["deepmerge", "immediate", "recursive"],
          "type": "string"
        },
        "specVersion": {
          "description": "Major OpenAPI version to generate; defaults to version 2 when not specified\nPossible values:\n  - 2: generates OpenAPI version 2.\n  - 3: generates OpenAPI version 3.",
          "enum": [2, 3],
          "type": "number"
        },
        "tags": {
          "description": "Swagger Tags Information for your API",
          "items": {
            "$ref": "#/definitions/Swagger.Tag"
          },
          "type": "array"
        },
        "version": {
          "description": "API version number; defaults to npm package version",
          "type": "string"
        },
        "yaml": {
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "Swagger.ApiKeySecurity": {
      "properties": {
        "description": {
          "type": "string"
        },
        "in": {
          "enum": ["header", "query"],
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "enum": ["apiKey"],
          "type": "string"
        }
      },
      "type": "object"
    },
    "Swagger.BasicSecurity": {
      "properties": {
        "description": {
          "type": "string"
        },
        "type": {
          "enum": ["basic"],
          "type": "string"
        }
      },
      "type": "object"
    },
    "Swagger.BasicSecurity3": {
      "properties": {
        "description": {
          "type": "string"
        },
        "scheme": {
          "enum": ["basic"],
          "type": "string"
        },
        "type": {
          "enum": ["http"],
          "type": "string"
        }
      },
      "type": "object"
    },
    "Swagger.ExternalDocs": {
      "properties": {
        "description": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "Swagger.OAuth2AccessCodeSecurity": {
      "properties": {
        "authorizationUrl": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "flow": {
          "enum": ["accessCode"],
          "type": "string"
        },
        "scopes": {
          "$ref": "#/definitions/Swagger.OAuthScope"
        },
        "tokenUrl": {
          "type": "string"
        },
        "type": {
          "enum": ["oauth2"],
          "type": "string"
        }
      },
      "type": "object"
    },
    "Swagger.OAuth2ApplicationSecurity": {
      "properties": {
        "description": {
          "type": "string"
        },
        "flow": {
          "enum": ["application"],
          "type": "string"
        },
        "scopes": {
          "$ref": "#/definitions/Swagger.OAuthScope"
        },
        "tokenUrl": {
          "type": "string"
        },
        "type": {
          "enum": ["oauth2"],
          "type": "string"
        }
      },
      "type": "object"
    },
    "Swagger.OAuth2ImplicitSecurity": {
      "properties": {
        "authorizationUrl": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "flow": {
          "enum": ["implicit"],
          "type": "string"
        },
        "scopes": {
          "$ref": "#/definitions/Swagger.OAuthScope"
        },
        "type": {
          "enum": ["oauth2"],
          "type": "string"
        }
      },
      "type": "object"
    },
    "Swagger.OAuth2PasswordSecurity": {
      "properties": {
        "description": {
          "type": "string"
        },
        "flow": {
          "enum": ["password"],
          "type": "string"
        },
        "scopes": {
          "$ref": "#/definitions/Swagger.OAuthScope"
        },
        "tokenUrl": {
          "type": "string"
        },
        "type": {
          "enum": ["oauth2"],
          "type": "string"
        }
      },
      "type": "object"
    },
    "Swagger.OAuth2Security3": {
      "properties": {
        "description": {
          "type": "string"
        },
        "flows": {
          "$ref": "#/definitions/Swagger.OAuthFlow"
        },
        "type": {
          "enum": ["oauth2"],
          "type": "string"
        }
      },
      "type": "object"
    },
    "Swagger.OAuth2SecurityFlow3": {
      "properties": {
        "authorizationUrl": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "scopes": {
          "$ref": "#/definitions/Swagger.OAuthScope"
        },
        "tokenUrl": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "Swagger.OAuthFlow": {
      "properties": {
        "authorizationCode": {
          "$ref": "#/definitions/Swagger.OAuth2SecurityFlow3"
        },
        "clientCredentials": {
          "$ref": "#/definitions/Swagger.OAuth2SecurityFlow3"
        },
        "implicit": {
          "$ref": "#/definitions/Swagger.OAuth2SecurityFlow3"
        },
        "password": {
          "$ref": "#/definitions/Swagger.OAuth2SecurityFlow3"
        }
      },
      "type": "object"
    },
    "Swagger.OAuthScope": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object"
    },
    "Swagger.Tag": {
      "properties": {
        "description": {
          "type": "string"
        },
        "externalDocs": {
          "$ref": "#/definitions/Swagger.ExternalDocs"
        },
        "name": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "description": "JSON Schema for the tsoa configuration file",
  "id": "https://json.schemastore.org/tsoa",
  "title": "tsoa",
  "type": "object"
}
