{
 "components": {
  "schemas": {
   "AreaPage": {
    "required": [
     "schema",
     "area",
     "works",
     "items",
     "order",
     "not_established"
    ],
    "type": "object"
   },
   "Discover": {
    "required": [
     "schema",
     "endpoints",
     "states",
     "properties",
     "disclosure"
    ],
    "type": "object"
   },
   "EntityPage": {
    "required": [
     "schema",
     "entity_id",
     "record_sha256",
     "record_url",
     "claims",
     "not_established",
     "disclosure",
     "issuer"
    ],
    "type": "object"
   },
   "Index": {
    "required": [
     "schema",
     "entities",
     "areas",
     "how_to_verify"
    ],
    "type": "object"
   },
   "Record": {
    "required": [
     "schema",
     "subject",
     "claims",
     "not_established",
     "made_at",
     "made_by",
     "max_age_days"
    ],
    "type": "object"
   }
  }
 },
 "info": {
  "description": "Static, read-only JSON. Every page has an HTML twin with the same content. Not a ranking.",
  "title": "HORIZON SHIELD evidence records",
  "version": "0.5.0"
 },
 "openapi": "3.1.0",
 "paths": {
  "/evidence/business/a/{area}/{work}/index.json": {
   "get": {
    "parameters": [
     {
      "description": "area slug",
      "in": "path",
      "name": "area",
      "required": true,
      "schema": {
       "pattern": "^[a-z-]+$",
       "type": "string"
      }
     },
     {
      "description": "work slug",
      "in": "path",
      "name": "work",
      "required": true,
      "schema": {
       "pattern": "^[a-z-]+$",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/AreaPage"
        }
       }
      },
      "description": "OK"
     },
     "404": {
      "description": "no such entity, record or page"
     }
    },
    "summary": "Businesses for one area and work, unranked"
   }
  },
  "/evidence/business/c/{entity}/index.json": {
   "get": {
    "parameters": [
     {
      "description": "corporate number or d-<domain>",
      "in": "path",
      "name": "entity",
      "required": true,
      "schema": {
       "pattern": "^(\\d{13}|d-[a-z0-9-]+)$",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/EntityPage"
        }
       }
      },
      "description": "OK"
     },
     "404": {
      "description": "no such entity, record or page"
     }
    },
    "summary": "One entity"
   }
  },
  "/evidence/business/index.json": {
   "get": {
    "parameters": [],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Index"
        }
       }
      },
      "description": "OK"
     },
     "404": {
      "description": "no such entity, record or page"
     }
    },
    "summary": "All entities and area pages"
   }
  },
  "/evidence/business/records/{sha256}.json": {
   "get": {
    "parameters": [
     {
      "description": "SHA-256 of the bytes",
      "in": "path",
      "name": "sha256",
      "required": true,
      "schema": {
       "pattern": "^[0-9a-f]{64}$",
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Record"
        }
       }
      },
      "description": "OK"
     },
     "404": {
      "description": "no such entity, record or page"
     }
    },
    "summary": "Record bytes, content-addressed"
   }
  },
  "/evidence/business/v0/discover.json": {
   "get": {
    "parameters": [],
    "responses": {
     "200": {
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Discover"
        }
       }
      },
      "description": "OK"
     },
     "404": {
      "description": "no such entity, record or page"
     }
    },
    "summary": "Discovery document"
   }
  }
 },
 "servers": [
  {
   "url": "https://shield.the-horizons-innovation.com"
  }
 ]
}
