{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/samt/latest.json",
  "x-lintel": {
    "source": "https://www.schemastore.org/samt.json",
    "sourceSha256": "688c39646c6bc430aec4ed4f579b2852900c79daae787289fa292f0cf42a287d",
    "fileMatch": [
      "samt.yaml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "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
      }
    }
  },
  "additionalProperties": false
}
