{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "http://www.w3id.org/biocompute/1.3.0/schemas/extension_domain/fhir_extension.json",
    "type": "object",
    "required": [
        "fhir_endpoint",
        "fhir_version",
        "fhir_resources"
    ],
    "properties": {
        "fhir_endpoint": {
            "type": "string",
            "description": "Base URI of FHIR server where the resources are stored",
            "examples": [
                "http://fhirtest.uhn.ca/baseDstu3"
            ],
            "format": "uri"
        },
        "fhir_version": {
            "type": "string",
            "description": "FHIR version of the server endpoint"
        },
        "fhir_resources": {
            "type": "array",
            "items": {
                "type": "object",
                "required": [
                    "fhir_resource",
                    "fhir_id"
                ],
                "properties": {
                    "fhir_resource": {
                        "type": "string",
                        "description": "Type of FHIR resource used"
                    },
                    "fhir_id": {
                        "type": "string",
                        "description": "Server-specific identifier string"
                    }
                }
            }
        }
    }
}
