{
  "openapi": "3.0.3",
  "info": {
    "title": "LogicalModels Enumeration API",
    "description": "API endpoint providing an enumeration of all available Logical Model schemas",
    "version": "1.0.0"
  },
  "paths": {
    "/LogicalModels.schema.json": {
      "get": {
        "summary": "Get enumeration of all Logical Model schemas",
        "description": "Returns a list of all available Logical Model schemas with metadata",
        "responses": {
          "200": {
            "description": "Successfully retrieved logical_model enumeration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnumerationResponse"
                },
                "example": {
                  "type": "logical_model",
                  "count": 5,
                  "schemas": [
                    {
                      "filename": "StructureDefinition-CWT.schema.json",
                      "id": "http://smart.who.int/base/StructureDefinition-CWT.schema.json",
                      "title": "CBOR Web Token (CWT) Claim",
                      "description": "Logical Model for Data elements in CBOR Web Token (CWT) https://www.iana.org/assignments/cwt/cwt.xhtml",
                      "url": "./StructureDefinition-CWT.schema.json",
                      "propertyCount": 4
                    },
                    {
                      "filename": "StructureDefinition-COSEHeader.schema.json",
                      "id": "http://smart.who.int/base/StructureDefinition-COSEHeader.schema.json",
                      "title": "COSE Headers (DRAFT)",
                      "description": "Data elements for COSE Headers https://www.iana.org/assignments/cose/cose.xhtml#header-parameters",
                      "url": "./StructureDefinition-COSEHeader.schema.json",
                      "propertyCount": 3
                    },
                    {
                      "filename": "StructureDefinition-CWTPayload.schema.json",
                      "id": "http://smart.who.int/base/StructureDefinition-CWTPayload.schema.json",
                      "title": "CBOR Web Token (CWT) Payload (Common)",
                      "description": "Logical Model for CBOR Web Token (CWT) Payload Logical Modelin CWT Payload https://www.iana.org/assignments/cwt/cwt.xhtml ",
                      "url": "./StructureDefinition-CWTPayload.schema.json",
                      "propertyCount": 5
                    },
                    {
                      "filename": "StructureDefinition-SchemeInformation.schema.json",
                      "id": "http://smart.who.int/base/StructureDefinition-SchemeInformation.schema.json",
                      "title": "Scheme Information",
                      "description": "Logical Model for Information on the trusted list and its issuing scheme",
                      "url": "./StructureDefinition-SchemeInformation.schema.json",
                      "propertyCount": 21
                    },
                    {
                      "filename": "StructureDefinition-HCert.schema.json",
                      "id": "http://smart.who.int/base/StructureDefinition-HCert.schema.json",
                      "title": "Health Certificate",
                      "description": "Logical Model for the HCERT",
                      "url": "./StructureDefinition-HCert.schema.json",
                      "propertyCount": 6
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "EnumerationResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "#/LogicalModels.schema.json",
        "title": "Logical Model Enumeration Schema",
        "description": "JSON Schema defining the structure of the Logical Model enumeration endpoint response",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "logical_model",
            "description": "The type of schemas enumerated (logical_model)"
          },
          "count": {
            "type": "integer",
            "description": "Total number of schemas available"
          },
          "schemas": {
            "type": "array",
            "description": "Array of available schemas",
            "items": {
              "type": "object",
              "properties": {
                "filename": {
                  "type": "string",
                  "description": "Schema filename"
                },
                "id": {
                  "type": "string",
                  "description": "Schema $id"
                },
                "title": {
                  "type": "string",
                  "description": "Schema title"
                },
                "description": {
                  "type": "string",
                  "description": "Schema description"
                },
                "url": {
                  "type": "string",
                  "description": "Relative URL to the schema file"
                },
                "logicalModelUrl": {
                  "type": "string",
                  "description": "FHIR canonical URL of the Logical Model"
                },
                "propertyCount": {
                  "type": "integer",
                  "description": "Number of properties in the Logical Model"
                }
              },
              "required": [
                "filename",
                "title",
                "url"
              ]
            }
          }
        },
        "required": [
          "type",
          "count",
          "schemas"
        ],
        "example": {
          "type": "logical_model",
          "count": 5,
          "schemas": [
            {
              "filename": "StructureDefinition-CWT.schema.json",
              "id": "http://smart.who.int/base/StructureDefinition-CWT.schema.json",
              "title": "CBOR Web Token (CWT) Claim",
              "description": "Logical Model for Data elements in CBOR Web Token (CWT) https://www.iana.org/assignments/cwt/cwt.xhtml",
              "url": "./StructureDefinition-CWT.schema.json",
              "propertyCount": 4
            },
            {
              "filename": "StructureDefinition-COSEHeader.schema.json",
              "id": "http://smart.who.int/base/StructureDefinition-COSEHeader.schema.json",
              "title": "COSE Headers (DRAFT)",
              "description": "Data elements for COSE Headers https://www.iana.org/assignments/cose/cose.xhtml#header-parameters",
              "url": "./StructureDefinition-COSEHeader.schema.json",
              "propertyCount": 3
            },
            {
              "filename": "StructureDefinition-CWTPayload.schema.json",
              "id": "http://smart.who.int/base/StructureDefinition-CWTPayload.schema.json",
              "title": "CBOR Web Token (CWT) Payload (Common)",
              "description": "Logical Model for CBOR Web Token (CWT) Payload Logical Modelin CWT Payload https://www.iana.org/assignments/cwt/cwt.xhtml ",
              "url": "./StructureDefinition-CWTPayload.schema.json",
              "propertyCount": 5
            },
            {
              "filename": "StructureDefinition-SchemeInformation.schema.json",
              "id": "http://smart.who.int/base/StructureDefinition-SchemeInformation.schema.json",
              "title": "Scheme Information",
              "description": "Logical Model for Information on the trusted list and its issuing scheme",
              "url": "./StructureDefinition-SchemeInformation.schema.json",
              "propertyCount": 21
            },
            {
              "filename": "StructureDefinition-HCert.schema.json",
              "id": "http://smart.who.int/base/StructureDefinition-HCert.schema.json",
              "title": "Health Certificate",
              "description": "Logical Model for the HCERT",
              "url": "./StructureDefinition-HCert.schema.json",
              "propertyCount": 6
            }
          ]
        }
      }
    }
  }
}