{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "title": "JSON schema for Prisma prisma.yml files",
  "definitions": {
    "subscription": {
      "description": "A piece of code that you should run.",
      "type": "object",
      "properties": {
        "query": {
          "type": "string"
        },
        "webhook": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string"
                },
                "headers": {
                  "type": "object"
                }
              },
              "required": ["url"]
            }
          ]
        }
      },
      "required": ["query", "webhook"]
    }
  },
  "properties": {
    "datamodel": {
      "description": "Type definitions for database models, relations, enums and other types",
      "type": ["string", "array"],
      "items": {
        "type": ["string", "array"]
      }
    },
    "secret": {
      "description": "Secret for securing the API Endpoint",
      "type": "string",
      "items": {
        "type": "string"
      }
    },
    "disableAuth": {
      "description": "Disable authentication for the endpoint",
      "type": "boolean",
      "items": {
        "type": "boolean"
      }
    },
    "generate": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "generator": {
            "type": "string"
          },
          "output": {
            "type": "string"
          }
        }
      }
    },
    "seed": {
      "description": "Database seed",
      "type": "object",
      "properties": {
        "import": {
          "type": "string"
        },
        "run": {
          "type": "string"
        }
      }
    },
    "subscriptions": {
      "description": "All server-side subscriptions",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/definitions/subscription"
      }
    },
    "custom": {
      "description": "Custom field to use in variable interpolations with ${self:custom.field}",
      "type": "object"
    },
    "hooks": {
      "description": "Command hooks. Current available hooks are: post-deploy.",
      "type": "object"
    },
    "endpoint": {
      "description": "Endpoint the service will be reachable at. This also determines the cluster the service will deployed to.",
      "type": "string",
      "items": {
        "type": "string"
      }
    },
    "databaseType": {
      "type": "string",
      "oneOf": [{ "enum": ["relational", "document"] }]
    }
  },
  "additionalProperties": false
}
