{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/sil-kit-registry-configuration.json",
  "additionalProperties": false,
  "definitions": {
    "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"
              }
            },
            "additionalProperties": false,
            "required": ["Type"]
          }
        }
      },
      "additionalProperties": false,
      "required": ["Sinks"]
    }
  },
  "description": "JSON schema for SIL KIT Registry configuration files.",
  "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": "#/definitions/Logging"
    }
  },
  "type": "object"
}
