{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "/ares.schema.json",
  "title": "Ares configuration",
  "description": "Configuration consumed by the Ares CLI.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "registryUrl",
    "apiUrl",
    "aliases"
  ],
  "properties": {
    "$schema": {
      "type": "string"
    },
    "registryUrl": {
      "type": "string",
      "format": "uri",
      "description": "Base URL serving the Ares registry at /r/*."
    },
    "apiUrl": {
      "type": "string",
      "format": "uri",
      "description": "Brand API URL used by ares sync."
    },
    "css": {
      "type": "string",
      "minLength": 1,
      "default": "app/globals.css"
    },
    "aliases": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "sections",
        "blocks",
        "ui",
        "libs",
        "hooks"
      ],
      "properties": {
        "sections": {
          "type": "string",
          "minLength": 1,
          "pattern": "^(~/|\\./|/)"
        },
        "blocks": {
          "type": "string",
          "minLength": 1,
          "pattern": "^(~/|\\./|/)"
        },
        "ui": {
          "type": "string",
          "minLength": 1,
          "pattern": "^(~/|\\./|/)"
        },
        "libs": {
          "type": "string",
          "minLength": 1,
          "pattern": "^(~/|\\./|/)"
        },
        "hooks": {
          "type": "string",
          "minLength": 1,
          "pattern": "^(~/|\\./|/)"
        }
      }
    }
  }
}
