{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/sil-kit-registry-configuration/latest.json",
  "description": "JSON schema for SIL KIT Registry configuration files.",
  "x-lintel": {
    "source": "https://www.schemastore.org/sil-kit-registry-configuration.json",
    "sourceSha256": "21cdbfd1d1875b4601965237640411c1a5b6784d882ae105f5957ffbf0760e43",
    "fileMatch": [
      "silkit-registry.yaml",
      "silkit-registry.yml",
      "silkit-registry.json",
      "*.silkit-registry.yaml",
      "*.silkit-registry.yml",
      "*.silkit-registry.json"
    ],
    "parsers": [
      "json",
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string",
      "description": "The schema file",
      "default": "",
      "examples": [
        "./RegistryConfiguration.schema.json"
      ]
    },
    "SchemaVersion": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "default": 0,
      "description": "Version of the schema used to validate this document"
    },
    "Description": {
      "type": "string",
      "description": "Free text field allowing a user to describe the configuration file in their own words. The contents of this field are not parsed or used internally.",
      "default": ""
    },
    "ListenUri": {
      "type": "string",
      "description": "The configured registry instance will listen on this address for incoming connections. Optional; This field overrides the -u, and --listen-uri command line parameters.",
      "examples": [
        "silkit://0.0.0.0:8501",
        "silkit://localhost:8500"
      ],
      "default": "silkit://localhost:8500"
    },
    "DashboardUri": {
      "type": "string",
      "description": "The configured registry instance will send data to this address to show it on the dashboard. Optional; This field overrides the -d, and --dashboard-uri command line parameters.",
      "examples": [
        "http://localhost:8082"
      ],
      "default": "http://localhost:8082"
    },
    "Logging": {
      "$ref": "#/$defs/Logging"
    }
  },
  "$defs": {
    "Logging": {
      "type": "object",
      "description": "Configures the properties of the SIL Kit Logging Service",
      "properties": {
        "FlushLevel": {
          "type": "string",
          "enum": [
            "Critical",
            "Error",
            "Warn",
            "Info",
            "Debug",
            "Trace",
            "Off"
          ]
        },
        "Sinks": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "Type": {
                "type": "string",
                "enum": [
                  "File",
                  "Stdout"
                ]
              },
              "Level": {
                "type": "string",
                "enum": [
                  "Critical",
                  "Error",
                  "Warn",
                  "Info",
                  "Debug",
                  "Trace",
                  "Off"
                ],
                "default": "Info",
                "examples": [
                  "Critical",
                  "Error",
                  "Warn",
                  "Info",
                  "Debug",
                  "Trace",
                  "Off"
                ]
              },
              "LogName": {
                "type": "string",
                "description": "Log name; Results in the following filename: <LogName>_%y-%m-%dT%h-%m-%s.txt"
              }
            },
            "required": [
              "Type"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "Sinks"
      ],
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
