{
  "$id": "https://json.schemastore.org/samt.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "properties": {
    "source": {
      "description": "Path to the source directory, defaults to ./src",
      "type": "string",
      "format": "uri-reference"
    },
    "repositories": {
      "description": "The default repositories to use if no repository is specified for a plugin",
      "type": "object",
      "properties": {
        "maven": {
          "description": "The url to the maven repository to use, defaults to https://repo.maven.apache.org/maven2",
          "type": "string",
          "format": "uri"
        }
      },
      "additionalProperties": false
    },
    "plugins": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "description": "A local plugin, should most likely not be used in production",
            "type": "object",
            "required": ["type", "path"],
            "properties": {
              "type": {
                "const": "local"
              },
              "path": {
                "type": "string",
                "format": "uri-reference"
              }
            },
            "additionalProperties": false
          },
          {
            "description": "A maven plugin in POM-like notation, will be downloaded from the provided repository",
            "type": "object",
            "required": ["type", "groupId", "artifactId", "version"],
            "properties": {
              "type": {
                "const": "maven"
              },
              "groupId": {
                "type": "string"
              },
              "artifactId": {
                "type": "string"
              },
              "version": {
                "type": "string"
              },
              "repository": {
                "type": "string",
                "format": "uri"
              }
            },
            "additionalProperties": false
          },
          {
            "description": "A maven plugin in gradle-like notation, will be downloaded from the provided repository",
            "type": "object",
            "required": ["type", "dependency"],
            "properties": {
              "type": {
                "const": "gradle"
              },
              "dependency": {
                "type": "string"
              },
              "repository": {
                "type": "string",
                "format": "uri"
              }
            },
            "additionalProperties": false
          }
        ]
      }
    },
    "generators": {
      "description": "Which SAMT generators to use",
      "type": "array",
      "items": {
        "type": "object",
        "required": ["name"],
        "properties": {
          "name": {
            "type": "string"
          },
          "output": {
            "type": "string",
            "format": "uri-reference"
          },
          "options": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      }
    }
  },
  "type": "object"
}