{
  "$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": 9,
    "schemas": [
      {
        "filename": "StructureDefinition-ICVPSD.schema.json",
        "id": "http://smart.who.int/base/StructureDefinition-ICVPSD.schema.json",
        "title": "DVC Icvp with Selective Disclosure",
        "description": "DVC Icvp with Selective Disclosure",
        "url": "./StructureDefinition-ICVPSD.schema.json",
        "propertyCount": 21
      },
      {
        "filename": "StructureDefinition-ICVPVaccineDetailsSD.schema.json",
        "id": "http://smart.who.int/base/StructureDefinition-ICVPVaccineDetailsSD.schema.json",
        "title": "ICVP Vaccine Details with Selective Disclosure",
        "description": "ICVP Vaccine Details with Selective Disclosure",
        "url": "./StructureDefinition-ICVPVaccineDetailsSD.schema.json",
        "propertyCount": 14
      },
      {
        "filename": "StructureDefinition-ICVPVaccineDetails.schema.json",
        "id": "http://smart.who.int/base/StructureDefinition-ICVPVaccineDetails.schema.json",
        "title": "ICVP - Vaccine Details",
        "description": "Vaccine Data elements for the International Certificate of Vaccination or Prophylaxis",
        "url": "./StructureDefinition-ICVPVaccineDetails.schema.json",
        "propertyCount": 7
      },
      {
        "filename": "StructureDefinition-ICVP.schema.json",
        "id": "http://smart.who.int/base/StructureDefinition-ICVP.schema.json",
        "title": "ICVP",
        "description": "Data elements for the Model International Certificate of Vaccination or Prophylaxis.",
        "url": "./StructureDefinition-ICVP.schema.json",
        "propertyCount": 10
      },
      {
        "filename": "StructureDefinition-pICVPVaccineDetails.schema.json",
        "id": "http://smart.who.int/base/StructureDefinition-pICVPVaccineDetails.schema.json",
        "title": "pICVP - Vaccine Details",
        "description": "Vaccine Data elements for the Paper Model International Certificate of Vaccination or Prophylaxis.",
        "url": "./StructureDefinition-pICVPVaccineDetails.schema.json",
        "propertyCount": 7
      },
      {
        "filename": "StructureDefinition-ICVPEvent.schema.json",
        "id": "http://smart.who.int/base/StructureDefinition-ICVPEvent.schema.json",
        "title": "ICVP (single)",
        "description": "ICVP for a single vaccincation event",
        "url": "./StructureDefinition-ICVPEvent.schema.json",
        "propertyCount": 11
      },
      {
        "filename": "StructureDefinition-ICVPMin.schema.json",
        "id": "http://smart.who.int/base/StructureDefinition-ICVPMin.schema.json",
        "title": "ICVP HCERT Payload",
        "description": "Mininmial DVC payload for use within an HCERT Payload using the ICVP Product Catalogue",
        "url": "./StructureDefinition-ICVPMin.schema.json",
        "propertyCount": 9
      },
      {
        "filename": "StructureDefinition-ICVPMinVaccineDetails.schema.json",
        "id": "http://smart.who.int/base/StructureDefinition-ICVPMinVaccineDetails.schema.json",
        "title": "ICVP HCERT Payload",
        "description": "Mininmial vaccine detail in DVC payload for use within an HCERT Payload using the ICVP Product Catalogue",
        "url": "./StructureDefinition-ICVPMinVaccineDetails.schema.json",
        "propertyCount": 8
      },
      {
        "filename": "StructureDefinition-pICVP.schema.json",
        "id": "http://smart.who.int/base/StructureDefinition-pICVP.schema.json",
        "title": "pICVP",
        "description": "Data elements for the Paper Model International Certificate of Vaccination or Prophylaxis.",
        "url": "./StructureDefinition-pICVP.schema.json",
        "propertyCount": 10
      }
    ]
  }
}