{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/jocker/latest.json",
  "title": "ConfigFile",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/Wykiki/jocker/main/schema.json",
    "sourceSha256": "149f4b564dd00c9e9a2d34823248ef0fcbb05aca484ce96ca4fb6ea3988d1f55",
    "fileMatch": [
      "jocker.yml",
      "jocker.yaml",
      "jocker.override.yml",
      "jocker.override.yaml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "default": {
      "anyOf": [
        {
          "$ref": "#/$defs/ConfigDefault"
        },
        {
          "type": "null"
        }
      ]
    },
    "processes": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/ConfigProcess"
      }
    },
    "stacks": {
      "default": {},
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/ConfigStack"
      }
    }
  },
  "required": [
    "processes"
  ],
  "$defs": {
    "ConfigDefault": {
      "type": "object",
      "properties": {
        "process": {
          "anyOf": [
            {
              "$ref": "#/$defs/ConfigProcessDefault"
            },
            {
              "type": "null"
            }
          ]
        },
        "stack": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "ConfigProcess": {
      "type": "object",
      "properties": {
        "args": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "binary": {
          "type": [
            "string",
            "null"
          ]
        },
        "cargo_args": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "env": {
          "default": {},
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "ConfigProcessDefault": {
      "type": "object",
      "properties": {
        "cargo_args": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "ConfigStack": {
      "type": "object",
      "properties": {
        "inherits": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true
        },
        "processes": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true
        }
      }
    }
  }
}
