{
  "openapi": "3.1.0",
  "info": {
    "title": "Functional and Non-Functional Requirements (DAK) API",
    "description": "Logical Model for representing Functional and Non-Functional Requirements from a DAK. A high-level list of core functions and capabilities that the system must have to meet the end users' needs.",
    "version": "1.0.0"
  },
  "paths": {
    "/StructureDefinition-Requirements.schema.json": {
      "get": {
        "summary": "JSON Schema definition for the Logical Model StructureDefinition-Requirements",
        "description": "This endpoint serves the JSON Schema definition for the Logical Model StructureDefinition-Requirements.",
        "responses": {
          "200": {
            "description": "The JSON Schema for StructureDefinition-Requirements",
            "content": {
              "application/schema+json": {
                "schema": {
                  "$ref": "./StructureDefinition-Requirements.schema.json"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "StructureDefinition-Requirements": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "$id": "http://smart.who.int/base/StructureDefinition-Requirements.schema.json",
        "title": "Functional and Non-Functional Requirements (DAK)",
        "description": "Logical Model for representing Functional and Non-Functional Requirements from a DAK. A high-level list of core functions and capabilities that the system must have to meet the end users' needs.",
        "type": "object",
        "properties": {
          "resourceType": {
            "type": "string",
            "const": "Requirements",
            "description": "Resource type identifier for Requirements logical model"
          },
          "description[x]": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "string",
                "format": "uri"
              }
            ],
            "description": "Description of the requirements - either Markdown content or a URI to a Markdown file (absolute or relative to repository root)"
          },
          "functional": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "FHIR BackboneElement"
            },
            "description": "Functional requirements for the system - can be provided as canonical reference or inline instance data"
          },
          "id": {
            "type": "object",
            "description": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces."
          },
          "modifierExtension": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "FHIR Extension"
            },
            "description": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself)."
          },
          "canonical": {
            "type": "string",
            "format": "uri",
            "description": "Canonical URI pointing to the NonFunctionalRequirement definition"
          },
          "instance": {
            "$ref": "StructureDefinition-NonFunctionalRequirement.schema.json",
            "description": "Inline NonFunctionalRequirement instance data"
          },
          "nonfunctional": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "FHIR BackboneElement"
            },
            "description": "Non-functional requirements for the system - can be provided as canonical reference or inline instance data"
          }
        },
        "required": [
          "resourceType"
        ],
        "allOf": [
          {
            "$ref": "./StructureDefinition-FHIRSchemaBase.schema.json"
          },
          {
            "type": "object",
            "properties": {
              "resourceDefinition": {
                "type": "string",
                "format": "uri",
                "const": "http://smart.who.int/base/StructureDefinition/Requirements"
              },
              "fhir:parent": {
                "type": "string",
                "const": "http://hl7.org/fhir/StructureDefinition/Base"
              }
            }
          }
        ]
      }
    }
  }
}