Commit c0070238 authored by Mark Canterbury's avatar Mark Canterbury
Browse files

Merge branch 'draft/json_schema' into cr/103120/0026

parents 0fc32c7c 510c5b28
Loading
Loading
Loading
Loading
+139 −0
Original line number Original line Diff line number Diff line
{
  "$id": "authorisation.json",
  "$defs": {
    "AuthorisationObject": {
      "type": "object",
      "properties": {
        "xsiType": {
          "type": "string",
          "enum": "{http://uri.etsi.org/03120/common/2020/09/Authorisation}AuthorisationObject"
        },
        "ObjectIdentifier": {
          "$ref": "core.json#/$defs/ObjectIdentifier"
        },
        "CountryCode": {
          "$ref": "etsi103280.json#/$defs/ISOCountryCode"
        },
        "OwnerIdentifier": {
          "$ref": "etsi103280.json#/$defs/ShortString"
        },
        "Generation": {
          "type": "integer",
          "minimum": 0
        },
        "ExternalIdentifier": {
          "$ref": "etsi103280.json#/$defs/LongString"
        },
        "AssociatedObjects": {
          "$ref": "core.json#/$defs/AssociatedObjects"
        },
        "LastChanged": {
          "$ref": "etsi103280.json#/$defs/QualifiedDateTime"
        },
        "NationalHandlingParameters": {
          "$ref": "core.json#/$defs/NationalHandlingParameters"
        },
        "AuthorisationReference": {
          "$ref": "etsi103280.json#/$defs/LongString"
        },
        "AuthorisationLegalType": {
          "$ref": "common.json#/$defs/DictionaryEntry"
        },
        "AuthorisationPriority": {
          "$ref": "common.json#/$defs/DictionaryEntry"
        },
        "AuthorisationStatus": {
          "$ref": "common.json#/$defs/DictionaryEntry"
        },
        "AuthorisationDesiredStatus": {
          "$ref": "common.json#/$defs/DictionaryEntry"
        },
        "AuthorisationTimespan": {
          "$ref": "#/$defs/AuthorisationTimespan"
        },
        "AuthorisationCSPID": {
          "$ref": "#/$defs/AuthorisationCSPID"
        },
        "AuthorisationCreationTimestamp": {
          "$ref": "etsi103280.json#/$defs/QualifiedDateTime"
        },
        "AuthorisationServedTimestamp": {
          "$ref": "etsi103280.json#/$defs/QualifiedDateTime"
        },
        "AuthorisationTerminationTimestamp": {
          "$ref": "etsi103280.json#/$defs/QualifiedDateTime"
        },
        "AuthorisationApprovalDetails": {
          "type": "array",
          "items": {
            "$ref": "common.json#/$defs/ApprovalDetails"
          }
        },
        "AuthorisationInvalidReason": {
          "$ref": "core.json#/$defs/ActionUnsuccesfulInformation"
        },
        "AuthorisationFlags": {
          "$ref": "#/$defs/AuthorisationFlags"
        },
        "AuthorisationManualInformation": {
          "$ref": "etsi103280.json#/$defs/LongString"
        },
        "NationalAuthorisationParameters": {
          "$ref": "#/$defs/NationalAuthorisationParameters"
        }
      },
      "required": [
        "xsiType",
        "ObjectIdentifier"
      ]
    },
    "AuthorisationFlags": {
      "type": "object",
      "properties": {
        "AuthorisationFlag": {
          "type": "array",
          "items": {
            "$ref": "common.json#/$defs/DictionaryEntry"
          }
        }
      },
      "required": []
    },
    "AuthorisationTimespan": {
      "type": "object",
      "properties": {
        "StartTime": {
          "$ref": "etsi103280.json#/$defs/QualifiedDateTime"
        },
        "EndTime": {
          "$ref": "etsi103280.json#/$defs/QualifiedDateTime"
        }
      },
      "required": []
    },
    "AuthorisationCSPID": {
      "type": "object",
      "properties": {
        "CSPID": {
          "type": "array",
          "items": {
            "$ref": "core.json#/$defs/EndpointID"
          },
          "minItems": 1
        }
      },
      "required": []
    },
    "NationalAuthorisationParameters": {
      "type": "object",
      "properties": {
        "CountryCode": {
          "$ref": "etsi103280.json#/$defs/ISOCountryCode"
        }
      },
      "required": [
        "CountryCode"
      ]
    }
  }
}
 No newline at end of file

json/common.json

0 → 100644
+164 −0
Original line number Original line Diff line number Diff line
{
  "$id": "common.json",
  "$defs": {
    "ETSIVersion": {
      "allOf": [
        {
          "$ref": "etsi103280.json#/$defs/ShortString"
        },
        {
          "type": "string",
          "pattern": "^V\\d+\\.\\d+\\.\\d+$"
        }
      ]
    },
    "DictionaryEntry": {
      "type": "object",
      "properties": {
        "Owner": {
          "$ref": "etsi103280.json#/$defs/ShortString"
        },
        "Name": {
          "$ref": "etsi103280.json#/$defs/ShortString"
        },
        "Value": {
          "$ref": "etsi103280.json#/$defs/ShortString"
        }
      },
      "required": [
        "Owner",
        "Name",
        "Value"
      ]
    },
    "ApprovalDetails": {
      "type": "object",
      "properties": {
        "ApprovalType": {
          "$ref": "etsi103280.json#/$defs/LongString"
        },
        "ApprovalDescription": {
          "$ref": "etsi103280.json#/$defs/LongString"
        },
        "ApprovalReference": {
          "$ref": "etsi103280.json#/$defs/LongString"
        },
        "ApproverDetails": {
          "$ref": "#/$defs/ApproverDetails"
        },
        "ApprovalTimestamp": {
          "$ref": "etsi103280.json#/$defs/QualifiedDateTime"
        },
        "ApprovalIsEmergency": {
          "type": "boolean"
        },
        "ApprovalDigitalSignature": {
          "$ref": "#/$defs/ApprovalDigitalSignature"
        },
        "ApprovalNationalDetails": {
          "$ref": "#/$defs/ApprovalNationalDetails"
        }
      },
      "required": []
    },
    "ApproverDetails": {
      "type": "object",
      "properties": {
        "ApproverName": {
          "$ref": "etsi103280.json#/$defs/LongString"
        },
        "ApproverRole": {
          "$ref": "etsi103280.json#/$defs/LongString"
        },
        "ApproverIdentity": {
          "$ref": "#/$defs/ApproverIdentity"
        },
        "ApproverContactDetails": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ApproverContactDetails"
          }
        }
      },
      "required": []
    },
    "ApproverIdentity": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "NationalApproverIdentity": {
              "$ref": "#/$defs/NationalApproverIdentity"
            }
          },
          "required": [
            "NationalApproverIdentity"
          ]
        }
      ]
    },
    "ApproverContactDetails": {
      "type": "object",
      "properties": {
        "ApproverAlternateName": {
          "$ref": "etsi103280.json#/$defs/LongString"
        },
        "ApproverEmailAddress": {
          "$ref": "etsi103280.json#/$defs/InternationalizedEmailAddress"
        },
        "ApproverPhoneNumber": {
          "$ref": "etsi103280.json#/$defs/InternationalE164"
        }
      },
      "required": []
    },
    "NationalApproverIdentity": {
      "type": "object",
      "properties": {
        "CountryCode": {
          "$ref": "etsi103280.json#/$defs/ISOCountryCode"
        }
      },
      "required": [
        "CountryCode"
      ]
    },
    "ApprovalDigitalSignature": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "NationalDigitalSignature": {
              "$ref": "#/$defs/NationalDigitalSignature"
            }
          },
          "required": [
            "NationalDigitalSignature"
          ]
        }
      ]
    },
    "ApprovalNationalDetails": {
      "type": "object",
      "properties": {
        "CountryCode": {
          "$ref": "etsi103280.json#/$defs/ISOCountryCode"
        }
      },
      "required": [
        "CountryCode"
      ]
    },
    "NationalDigitalSignature": {
      "type": "object",
      "properties": {
        "CountryCode": {
          "$ref": "etsi103280.json#/$defs/ISOCountryCode"
        }
      },
      "required": [
        "CountryCode"
      ]
    }
  }
}
 No newline at end of file

json/core.json

0 → 100644
+580 −0
Original line number Original line Diff line number Diff line
{
  "$id": "core.json",
  "$defs": {
    "ObjectIdentifier": {
      "$ref": "etsi103280.json#/$defs/UUID"
    },
    "HI1Message": {
      "type": "object",
      "properties": {
        "Header": {
          "$ref": "#/$defs/MessageHeader"
        },
        "Payload": {
          "$ref": "#/$defs/MessagePayload"
        }
      },
      "required": [
        "Header",
        "Payload"
      ]
    },
    "MessageHeader": {
      "type": "object",
      "properties": {
        "SenderIdentifier": {
          "$ref": "#/$defs/EndpointID"
        },
        "ReceiverIdentifier": {
          "$ref": "#/$defs/EndpointID"
        },
        "TransactionIdentifier": {
          "$ref": "etsi103280.json#/$defs/UUID"
        },
        "Timestamp": {
          "$ref": "etsi103280.json#/$defs/QualifiedMicrosecondDateTime"
        },
        "Version": {
          "$ref": "#/$defs/Version"
        }
      },
      "required": [
        "SenderIdentifier",
        "ReceiverIdentifier",
        "TransactionIdentifier",
        "Timestamp",
        "Version"
      ]
    },
    "Version": {
      "type": "object",
      "properties": {
        "ETSIVersion": {
          "$ref": "common.json#/$defs/ETSIVersion"
        },
        "NationalProfileOwner": {
          "$ref": "etsi103280.json#/$defs/ShortString"
        },
        "NationalProfileVersion": {
          "$ref": "etsi103280.json#/$defs/ShortString"
        }
      },
      "required": [
        "ETSIVersion",
        "NationalProfileOwner",
        "NationalProfileVersion"
      ]
    },
    "EndpointID": {
      "type": "object",
      "properties": {
        "CountryCode": {
          "$ref": "etsi103280.json#/$defs/ISOCountryCode"
        },
        "UniqueIdentifier": {
          "$ref": "etsi103280.json#/$defs/LongString"
        }
      },
      "required": [
        "CountryCode",
        "UniqueIdentifier"
      ]
    },
    "MessagePayload": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "RequestPayload": {
              "$ref": "#/$defs/RequestPayload"
            }
          },
          "required": [
            "RequestPayload"
          ]
        },
        {
          "type": "object",
          "properties": {
            "ResponsePayload": {
              "$ref": "#/$defs/ResponsePayload"
            }
          },
          "required": [
            "ResponsePayload"
          ]
        }
      ]
    },
    "RequestPayload": {
      "type": "object",
      "properties": {
        "ActionRequests": {
          "$ref": "#/$defs/ActionRequests"
        }
      },
      "required": [
        "ActionRequests"
      ]
    },
    "ActionRequests": {
      "type": "object",
      "properties": {
        "ActionRequest": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ActionRequest"
          },
          "minItems": 1
        }
      },
      "required": []
    },
    "ResponsePayload": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "ActionResponses": {
              "$ref": "#/$defs/ActionResponses"
            }
          },
          "required": [
            "ActionResponses"
          ]
        },
        {
          "type": "object",
          "properties": {
            "ErrorInformation": {
              "$ref": "#/$defs/ActionUnsuccesfulInformation"
            }
          },
          "required": [
            "ErrorInformation"
          ]
        }
      ]
    },
    "ActionResponses": {
      "type": "object",
      "properties": {
        "ActionResponse": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ActionResponse"
          },
          "minItems": 1
        }
      },
      "required": []
    },
    "ActionRequest": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "ActionIdentifier": {
              "type": "integer",
              "minimum": 0
            }
          },
          "required": [
            "ActionIdentifier"
          ]
        },
        {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "GET": {
                  "$ref": "#/$defs/GETRequest"
                }
              },
              "required": [
                "GET"
              ]
            },
            {
              "type": "object",
              "properties": {
                "CREATE": {
                  "$ref": "#/$defs/CREATERequest"
                }
              },
              "required": [
                "CREATE"
              ]
            },
            {
              "type": "object",
              "properties": {
                "UPDATE": {
                  "$ref": "#/$defs/UPDATERequest"
                }
              },
              "required": [
                "UPDATE"
              ]
            },
            {
              "type": "object",
              "properties": {
                "LIST": {
                  "$ref": "#/$defs/LISTRequest"
                }
              },
              "required": [
                "LIST"
              ]
            },
            {
              "type": "object",
              "properties": {
                "DELIVER": {
                  "$ref": "#/$defs/DELIVERRequest"
                }
              },
              "required": [
                "DELIVER"
              ]
            }
          ]
        }
      ]
    },
    "ActionResponse": {
      "allOf": [
        {
          "type": "object",
          "properties": {
            "ActionIdentifier": {
              "type": "integer",
              "minimum": 0
            }
          },
          "required": [
            "ActionIdentifier"
          ]
        },
        {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "GETResponse": {
                  "$ref": "#/$defs/GETResponse"
                }
              },
              "required": [
                "GETResponse"
              ]
            },
            {
              "type": "object",
              "properties": {
                "CREATEResponse": {
                  "$ref": "#/$defs/CREATEResponse"
                }
              },
              "required": [
                "CREATEResponse"
              ]
            },
            {
              "type": "object",
              "properties": {
                "UPDATEResponse": {
                  "$ref": "#/$defs/UPDATEResponse"
                }
              },
              "required": [
                "UPDATEResponse"
              ]
            },
            {
              "type": "object",
              "properties": {
                "LISTResponse": {
                  "$ref": "#/$defs/LISTResponse"
                }
              },
              "required": [
                "LISTResponse"
              ]
            },
            {
              "type": "object",
              "properties": {
                "ErrorInformation": {
                  "$ref": "#/$defs/ActionUnsuccesfulInformation"
                }
              },
              "required": [
                "ErrorInformation"
              ]
            },
            {
              "type": "object",
              "properties": {
                "DELIVERResponse": {
                  "$ref": "#/$defs/DELIVERResponse"
                }
              },
              "required": [
                "DELIVERResponse"
              ]
            }
          ]
        }
      ]
    },
    "GETRequest": {
      "type": "object",
      "properties": {
        "Identifier": {
          "$ref": "#/$defs/ObjectIdentifier"
        }
      },
      "required": [
        "Identifier"
      ]
    },
    "GETResponse": {
      "type": "object",
      "properties": {
        "HI1Object": {
          "$ref": "#/$defs/OneOfHI1Object"
        }
      },
      "required": [
        "HI1Object"
      ]
    },
    "CREATERequest": {
      "type": "object",
      "properties": {
        "HI1Object": {
          "$ref": "#/$defs/OneOfHI1Object"
        }
      },
      "required": [
        "HI1Object"
      ]
    },
    "CREATEResponse": {
      "type": "object",
      "properties": {
        "Identifier": {
          "$ref": "#/$defs/ObjectIdentifier"
        },
        "HI1Object": {
          "$ref": "#/$defs/OneOfHI1Object"
        }
      },
      "required": [
        "Identifier"
      ]
    },
    "UPDATERequest": {
      "type": "object",
      "properties": {
        "HI1Object": {
          "$ref": "#/$defs/OneOfHI1Object"
        }
      },
      "required": [
        "HI1Object"
      ]
    },
    "UPDATEResponse": {
      "type": "object",
      "properties": {
        "Identifier": {
          "$ref": "#/$defs/ObjectIdentifier"
        },
        "HI1Object": {
          "$ref": "#/$defs/OneOfHI1Object"
        }
      },
      "required": [
        "Identifier"
      ]
    },
    "LISTRequest": {
      "type": "object",
      "properties": {
        "ObjectType": {
          "$ref": "common.json#/$defs/DictionaryEntry"
        },
        "LastChanged": {
          "$ref": "etsi103280.json#/$defs/QualifiedDateTime"
        }
      },
      "required": []
    },
    "LISTResponse": {
      "type": "object",
      "properties": {
        "ListResponseRecord": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ListResponseRecord"
          }
        }
      },
      "required": []
    },
    "ListResponseRecord": {
      "type": "object",
      "properties": {
        "ObjectType": {
          "$ref": "common.json#/$defs/DictionaryEntry"
        },
        "Identifier": {
          "$ref": "#/$defs/ObjectIdentifier"
        },
        "CountryCode": {
          "$ref": "etsi103280.json#/$defs/ISOCountryCode"
        },
        "OwnerIdentifier": {
          "$ref": "etsi103280.json#/$defs/ShortString"
        },
        "Generation": {
          "type": "integer",
          "minimum": 0
        },
        "ExternalIdentifier": {
          "$ref": "etsi103280.json#/$defs/LongString"
        },
        "LastChanged": {
          "$ref": "etsi103280.json#/$defs/QualifiedDateTime"
        }
      },
      "required": [
        "ObjectType",
        "Identifier",
        "Generation"
      ]
    },
    "ActionUnsuccesfulInformation": {
      "type": "object",
      "properties": {
        "ErrorCode": {
          "type": "integer",
          "minimum": 0
        },
        "ErrorDescription": {
          "$ref": "etsi103280.json#/$defs/LongString"
        }
      },
      "required": [
        "ErrorCode",
        "ErrorDescription"
      ]
    },
    "DELIVERRequest": {
      "type": "object",
      "properties": {
        "Identifier": {
          "$ref": "#/$defs/ObjectIdentifier"
        },
        "HI1Object": {
          "$ref": "#/$defs/OneOfHI1Object"
        }
      },
      "required": [
        "Identifier",
        "HI1Object"
      ]
    },
    "DELIVERResponse": {
      "type": "object",
      "properties": {
        "Identifier": {
          "$ref": "#/$defs/ObjectIdentifier"
        }
      },
      "required": [
        "Identifier"
      ]
    },
    "HI1Object": {
      "type": "object",
      "properties": {
        "ObjectIdentifier": {
          "$ref": "#/$defs/ObjectIdentifier"
        },
        "CountryCode": {
          "$ref": "etsi103280.json#/$defs/ISOCountryCode"
        },
        "OwnerIdentifier": {
          "$ref": "etsi103280.json#/$defs/ShortString"
        },
        "Generation": {
          "type": "integer",
          "minimum": 0
        },
        "ExternalIdentifier": {
          "$ref": "etsi103280.json#/$defs/LongString"
        },
        "AssociatedObjects": {
          "$ref": "#/$defs/AssociatedObjects"
        },
        "LastChanged": {
          "$ref": "etsi103280.json#/$defs/QualifiedDateTime"
        },
        "NationalHandlingParameters": {
          "$ref": "#/$defs/NationalHandlingParameters"
        }
      },
      "required": [
        "ObjectIdentifier"
      ]
    },
    "AssociatedObjects": {
      "type": "object",
      "properties": {
        "AssociatedObject": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ObjectIdentifier"
          }
        }
      },
      "required": []
    },
    "NationalHandlingParameters": {
      "type": "object",
      "properties": {
        "CountryCode": {
          "$ref": "etsi103280.json#/$defs/ISOCountryCode"
        }
      },
      "required": [
        "CountryCode"
      ]
    },
    "OneOfHI1Object": {
      "oneOf": [
        {
          "$ref": "authorisation.json#/$defs/AuthorisationObject"
        },
        {
          "$ref": "task.json#/$defs/LITaskObject"
        },
        {
          "$ref": "task.json#/$defs/LDTaskObject"
        },
        {
          "$ref": "document.json#/$defs/DocumentObject"
        },
        {
          "$ref": "notification.json#/$defs/NotificationObject"
        }
      ]
    }
  },
  "$ref": "#/$defs/HI1Message"
}
 No newline at end of file

json/delivery.json

0 → 100644
+209 −0

File added.

Preview size limit exceeded, changes collapsed.

json/document.json

0 → 100644
+148 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading