{
  "openapi": "3.1.0",
  "info": {
    "title": "Channing Way API",
    "version": "0.4.0",
    "description": "Read-only endpoints describing Channing Way's public state."
  },
  "servers": [
    {
      "url": "https://channingway.ai",
      "description": "production"
    }
  ],
  "paths": {
    "/api/manifest.json": {
      "get": {
        "summary": "Public manifest",
        "description": "Returns Channing Way's public identity as a Schema.org Organization JSON-LD document.",
        "responses": {
          "200": {
            "description": "Schema.org Organization JSON-LD document",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationManifest"
                }
              }
            }
          }
        }
      }
    },
    "/api/poc.json": {
      "get": {
        "summary": "Public POC receipts",
        "description": "Returns machine-readable public proof of concept receipts as a JSON-LD ItemList.",
        "responses": {
          "200": {
            "description": "JSON-LD ItemList of public proof of concept receipts",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/PocReceiptList"
                }
              }
            }
          }
        }
      }
    },
    "/api/health.json": {
      "get": {
        "summary": "Public status document",
        "description": "Returns a minimal public status object. This endpoint does not indicate the health of any underlying orchestration or API services.",
        "responses": {
          "200": {
            "description": "Public status object",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthStatus"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "OrganizationManifest": {
        "type": "object",
        "description": "Schema.org Organization document with embedded JSON-LD context. The authoritative content is shared with the Organization JSON-LD block embedded in /index.html and the served JSON-LD document at /api/manifest.json. This schema documents the structural shape for OpenAPI client generation; future revisions will introduce a single-source build step to eliminate hand-maintained drift.",
        "properties": {
          "@context": {
            "type": "string",
            "format": "uri",
            "const": "https://schema.org"
          },
          "@type": {
            "type": "string",
            "const": "Organization"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "description": {
            "type": "string"
          },
          "foundingDate": {
            "type": "string"
          },
          "address": {
            "type": "object",
            "properties": {
              "@type": {
                "type": "string",
                "const": "PostalAddress"
              },
              "addressLocality": {
                "type": "string"
              },
              "addressRegion": {
                "type": "string"
              },
              "addressCountry": {
                "type": "string"
              }
            },
            "required": [
              "@type",
              "addressLocality",
              "addressRegion",
              "addressCountry"
            ]
          },
          "founder": {
            "type": "object",
            "description": "Reference to a Person entity by @id.",
            "properties": {
              "@id": {
                "type": "string",
                "format": "uri"
              }
            },
            "required": [
              "@id"
            ]
          },
          "sameAs": {
            "type": "array",
            "description": "Canonical external URLs identifying the same Organization across surfaces.",
            "items": {
              "type": "string",
              "format": "uri"
            }
          }
        },
        "required": [
          "@context",
          "@type",
          "name",
          "url",
          "description",
          "foundingDate",
          "address",
          "founder",
          "sameAs"
        ]
      },
      "PocReceiptList": {
        "type": "object",
        "description": "Schema.org ItemList describing public proof of concept receipts. Custom cw:* properties classify each receipt for agent extraction.",
        "properties": {
          "@context": {
            "type": "object"
          },
          "@type": {
            "type": "string",
            "const": "ItemList"
          },
          "@id": {
            "type": "string",
            "format": "uri"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "numberOfItems": {
            "type": "integer"
          },
          "itemListElement": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PocReceiptListItem"
            }
          }
        },
        "required": [
          "@context",
          "@type",
          "@id",
          "name",
          "description",
          "url",
          "numberOfItems",
          "itemListElement"
        ]
      },
      "PocReceiptListItem": {
        "type": "object",
        "properties": {
          "@type": {
            "type": "string",
            "const": "ListItem"
          },
          "position": {
            "type": "integer"
          },
          "item": {
            "$ref": "#/components/schemas/PocReceipt"
          }
        },
        "required": [
          "@type",
          "position",
          "item"
        ]
      },
      "PocReceipt": {
        "type": "object",
        "properties": {
          "@type": {
            "type": "string"
          },
          "@id": {
            "type": "string",
            "format": "uri"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "cw:category": {
            "type": "string",
            "enum": [
              "report_filed",
              "upstream_contribution",
              "publication"
            ]
          },
          "cw:system": {
            "type": "string"
          },
          "cw:artifactType": {
            "type": "string"
          },
          "cw:claim": {
            "type": "string"
          }
        },
        "required": [
          "@type",
          "@id",
          "name",
          "url",
          "cw:category",
          "cw:system",
          "cw:artifactType",
          "cw:claim"
        ]
      },
      "HealthStatus": {
        "type": "object",
        "description": "Static public-status document. Not a live service health check; confirms only that the static asset is served.",
        "properties": {
          "service": {
            "type": "string",
            "const": "channingway.ai"
          },
          "asset": {
            "type": "string",
            "const": "static"
          },
          "note": {
            "type": "string"
          },
          "schema_version": {
            "type": "string",
            "const": "1.0"
          }
        },
        "required": [
          "service",
          "asset",
          "note",
          "schema_version"
        ]
      }
    }
  }
}
