{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "http://smart.who.int/base/StructureDefinition-TestScenario.schema.json",
  "title": "Test Scenario (DAK)",
  "description": "Logical Model for representing Test Scenarios from a DAK. A set of test scenarios to validate an implementation of the DAK.",
  "type": "object",
  "properties": {
    "resourceType": {
      "type": "string",
      "const": "TestScenario",
      "description": "Resource type identifier for TestScenario logical model"
    },
    "feature": {
      "type": "string",
      "format": "uri",
      "description": "Link to a feature file containing the test scenarios"
    },
    "description[x]": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "string",
          "format": "uri"
        }
      ],
      "description": "Description of the test scenario - either Markdown content or a URI to a Markdown file (absolute or relative to repository root)"
    }
  },
  "required": [
    "resourceType",
    "feature"
  ],
  "allOf": [
    {
      "$ref": "./StructureDefinition-FHIRSchemaBase.schema.json"
    },
    {
      "type": "object",
      "properties": {
        "resourceDefinition": {
          "type": "string",
          "format": "uri",
          "const": "http://smart.who.int/base/StructureDefinition/TestScenario"
        },
        "fhir:parent": {
          "type": "string",
          "const": "http://hl7.org/fhir/StructureDefinition/Base"
        }
      }
    }
  ]
}