{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://loop.firmiana.si/api/v1/schemas/index.schema.json",
  "title": "Every API endpoint (api/v1/index.json)",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema", "version", "generated_at", "license", "docs", "openapi", "endpoints"],
  "properties": {
    "schema": { "type": "string", "format": "uri" }, "version": { "const": 1 }, "generated_at": { "type": "string", "format": "date-time" }, "license": { "const": "CC-BY-4.0" },
    "docs": { "type": "string", "format": "uri" },
    "openapi": { "type": "string", "format": "uri" },
    "endpoints": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["path", "url", "type", "updated", "description", "schema"],
        "properties": {
          "path": { "type": "string" },
          "url": { "type": "string", "format": "uri" },
          "type": { "type": "string" },
          "updated": { "type": "string" },
          "description": { "type": "string" },
          "schema": { "type": ["string", "null"], "format": "uri" }
        }
      }
    }
  }
}
