{
    "$comment": "JSON Schema for CSR Framework",
    "$schema": "http://json-schema.org/draft-04/schema",
    "definitions": {
      "log": {
        "type": "object",
        "title": "Logger options",
        "properties": {
          "channel": {
            "type": "string",
            "default": "console"
          },
          "path": {
            "type": "string",
            "default": "../src/logs"
          },
          "template": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "file": {
                "type": "string"
              },
              "dir": {
                "type": "string"
              }
            }
          },
          "telegram": {
            "type": "object",
            "properties": {
              "bot_token": {
                "type": "string"
              },
              "chat_id": {
                "type": "string"
              }
            },
            "required": ["chat_id", "bot_token"]
          }
        }
      },
      "template": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "cache": {
            "type": "string"
          }
        }
      },
      "database": {
        "type": "object",
        "patternProperties": {
          ".*": {
            "type": "object",
            "properties": {
              "provider": {
                "type": "string"
              },
              "user": {
                "type": "string"
              },
              "password": {
                "type": "string"
              }
            },
            "required": ["provider"]
          }
        }
      }
    },
    "id": "https://json.schemastore.org/csr",
    "properties": {
      "log": {
        "$ref": "#/definitions/log"
      },
      "template": {
        "$ref": "#/definitions/template"
      },
      "database": {
        "$ref": "#/definitions/database"
      }
    },
    "title": "CSR Framework schema",
    "type": "object"
  }
