{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/configu-configu-file/latest.json",
  "title": "JSON Schema for Configu .configu file",
  "description": "<https://docs.configu.com/interfaces/.configu>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/configu/configu/main/packages/schema/.configu.json",
    "sourceSha256": "c0ea953cb2c7dd84b88bf2fc325228aced946da0b6d41e64f145bfa586941e3c",
    "fileMatch": [
      ".configu"
    ]
  },
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string",
      "minLength": 1,
      "description": "Url to JSON Schema"
    },
    "interface": {
      "description": "Global configuration for a Configu interface.",
      "type": "object",
      "required": [],
      "properties": {
        "debug": {
          "description": "Enables or disables debug mode.",
          "type": "boolean"
        },
        "proxy": {
          "description": "Configuration for the Configu proxy server.",
          "type": "object",
          "required": [],
          "properties": {
            "host": {
              "description": "The host address of the proxy server.",
              "type": "string"
            },
            "domain": {
              "description": "The domain of the proxy server.",
              "type": "string"
            },
            "tls": {
              "type": "object",
              "required": [
                "enabled",
                "cert",
                "key"
              ],
              "properties": {
                "enabled": {
                  "description": "Enables or disables transport layer security (TLS).",
                  "type": "boolean",
                  "default": false
                },
                "cert": {
                  "description": "The (absolute) file path of the certificate to use for the TLS connection.",
                  "type": "string"
                },
                "key": {
                  "description": "The (absolute) file path of the TLS key that should be used for the TLS connection.",
                  "type": "string"
                }
              },
              "additionalProperties": false
            },
            "auth": {
              "type": "object",
              "required": [],
              "properties": {
                "bearer": {
                  "description": "Enables or disables preshared key authentication.",
                  "type": "object",
                  "required": [
                    "keys"
                  ],
                  "properties": {
                    "keys": {
                      "description": "List of preshared keys that are allowed to access the server.",
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "minItems": 1
                    }
                  },
                  "additionalProperties": false
                }
              },
              "additionalProperties": false
            },
            "http": {
              "type": "object",
              "required": [],
              "properties": {
                "enabled": {
                  "description": "Enables or disables the HTTP server.",
                  "type": "boolean"
                },
                "port": {
                  "description": "The host port to serve the HTTP server on.",
                  "type": "number"
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "stores": {
      "type": "object",
      "required": [],
      "additionalProperties": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "configuration": {
            "type": "object"
          },
          "backup": {
            "type": "boolean"
          },
          "default": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      }
    },
    "backup": {
      "type": "string",
      "minLength": 1
    },
    "schemas": {
      "type": "object",
      "required": [],
      "additionalProperties": {
        "type": "string"
      }
    },
    "register": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "scripts": {
      "type": "object",
      "required": [],
      "additionalProperties": {
        "type": "string"
      }
    }
  },
  "required": [],
  "additionalProperties": false,
  "$comment": "https://jsonschema.dev/s/3pOmT"
}
