diff --git a/103120/dictionaries/ts_103120_Dictionaries.schema.json b/103120/dictionaries/ts_103120_Dictionaries.schema.json
new file mode 100644
index 0000000000000000000000000000000000000000..d439cd6c3eba30a8024c1b50de613a4932e3075c
--- /dev/null
+++ b/103120/dictionaries/ts_103120_Dictionaries.schema.json
@@ -0,0 +1,65 @@
+{
+ "$id": "ts_103280_Dictionaries_2019_10",
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$defs": {
+ "Dictionaries": {
+ "type": "object",
+ "properties": {
+ "dictionaries:Dictionary": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/Dictionary"
+ }
+ }
+ },
+ "required": []
+ },
+ "Dictionary": {
+ "type": "object",
+ "properties": {
+ "dictionaries:Owner": {
+ "type": "string"
+ },
+ "dictionaries:Name": {
+ "type": "string"
+ },
+ "dictionaries:DictionaryEntries": {
+ "$ref": "#/$defs/DictionaryEntries"
+ }
+ },
+ "required": [
+ "dictionaries:Owner",
+ "dictionaries:Name",
+ "dictionaries:DictionaryEntries"
+ ]
+ },
+ "DictionaryEntries": {
+ "type": "object",
+ "properties": {
+ "dictionaries:DictionaryEntry": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/DictionaryEntry"
+ }
+ }
+ },
+ "required": []
+ },
+ "DictionaryEntry": {
+ "type": "object",
+ "properties": {
+ "dictionaries:Value": {
+ "type": "string"
+ },
+ "dictionaries:Meaning": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "dictionaries:Value",
+ "dictionaries:Meaning"
+ ]
+ }
+ },
+ "$ref": "#/$defs/Dictionaries"
+}
diff --git a/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml b/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml
index 242ca814aded62a7b57ce2a35da92610883b11c1..383bccc79cfab62d7487fb181613e6c59c10c288 100644
--- a/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml
+++ b/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml
@@ -715,6 +715,56 @@
+
+
+ ETSI
+ LIWorkflowEndpoint
+
+
+ NewAuthorisation
+ Implementer supports the "New Authorisation" Endpoint.
+
+
+ AuthorisationExtension
+ Implementer supports the "Authorisation Extension" Endpoint.
+
+
+ AuthorisationCancellation
+ Implementer supports the "Authorisation Cancellation" Endpoint.
+
+
+ TaskAddition
+ Implementer supports the "Task Addition" Endpoint.
+
+
+ TaskCancellation
+ Implementer supports the "Task Cancellation" Endpoint.
+
+
+ ChangeOfDelivery
+ Implementer supports the "Change of Delivery" Endpoint.
+
+
+
+
+
+ ETSI
+ LPWorkflowEndpoint
+
+
+ NewPreservation
+ Implementer supports the "New Preservation" Endpoint.
+
+
+ PreservationExtension
+ Implementer supports the "Preservation Extension" Endpoint.
+
+
+ PreservationCancellation
+ Implementer supports the "Preservation Cancellation" Endpoint.
+
+
+
ETSI
diff --git a/103120/examples/json/request_config.json b/103120/examples/json/request_config.json
new file mode 100644
index 0000000000000000000000000000000000000000..00f13634285371022a4cf56c564d7e106d6a8f03
--- /dev/null
+++ b/103120/examples/json/request_config.json
@@ -0,0 +1,36 @@
+{
+ "@xmlns": "http://uri.etsi.org/03120/common/2019/10/Core",
+ "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
+ "@xmlns:common": "http://uri.etsi.org/03120/common/2016/02/Common",
+ "@xmlns:task": "http://uri.etsi.org/03120/common/2020/09/Task",
+ "@xmlns:auth": "http://uri.etsi.org/03120/common/2020/09/Authorisation",
+ "Header": {
+ "SenderIdentifier": {
+ "CountryCode": "XX",
+ "UniqueIdentifier": "ACTOR01"
+ },
+ "ReceiverIdentifier": {
+ "CountryCode": "XX",
+ "UniqueIdentifier": "ACTOR02"
+ },
+ "TransactionIdentifier": "eb6b002d-15c3-4c3b-af6c-27ede73641e5",
+ "Timestamp": "2024-06-10T08:50:31.000000Z",
+ "Version": {
+ "ETSIVersion": "V1.16.1",
+ "NationalProfileOwner": "XX",
+ "NationalProfileVersion": "v1.0"
+ }
+ },
+ "Payload": {
+ "RequestPayload": {
+ "ActionRequests": {
+ "ActionRequest": [
+ {
+ "ActionIdentifier": 0,
+ "CONFIG": {}
+ }
+ ]
+ }
+ }
+ }
+}
diff --git a/103120/examples/json/response_config.json b/103120/examples/json/response_config.json
new file mode 100644
index 0000000000000000000000000000000000000000..a5bc120d0fbdd06d6cad60d4b622d74f4236fb75
--- /dev/null
+++ b/103120/examples/json/response_config.json
@@ -0,0 +1,126 @@
+{
+ "@xmlns": "http://uri.etsi.org/03120/common/2019/10/Core",
+ "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
+ "@xmlns:common": "http://uri.etsi.org/03120/common/2016/02/Common",
+ "@xmlns:task": "http://uri.etsi.org/03120/common/2020/09/Task",
+ "@xmlns:config": "http://uri.etsi.org/03120/common/2024/06/Config",
+ "@xmlns:dictionaries": "http://uri.etsi.org/03280/common/2019/10/Dictionaries",
+ "Header": {
+ "SenderIdentifier": {
+ "CountryCode": "XX",
+ "UniqueIdentifier": "ACTOR01"
+ },
+ "ReceiverIdentifier": {
+ "CountryCode": "XX",
+ "UniqueIdentifier": "ACTOR02"
+ },
+ "TransactionIdentifier": "eb6b002d-15c3-4c3b-af6c-27ede73641e5",
+ "Timestamp": "2024-06-10T08:50:31.000000Z",
+ "Version": {
+ "ETSIVersion": "V1.16.1",
+ "NationalProfileOwner": "XX",
+ "NationalProfileVersion": "v1.0"
+ }
+ },
+ "Payload": {
+ "ResponsePayload": {
+ "ActionResponses": {
+ "ActionResponse": [
+ {
+ "ActionIdentifier": 0,
+ "CONFIGResponse": {
+ "LastChanged": "2024-05-10T08:52:32Z",
+ "Dictionaries": {
+ "dictionaries:Dictionary": [
+ {
+ "dictionaries:Owner": "ACTOR2",
+ "dictionaries:Name": "LIServiceTypes",
+ "dictionaries:DictionaryEntries": {
+ "dictionaries:DictionaryEntry": [
+ {
+ "dictionaries:Value": "ServiceA",
+ "dictionaries:Meaning": "This is a dictionary entry"
+ },
+ {
+ "dictionaries:Value": "ServiceB",
+ "dictionaries:Meaning": "This is a dictionary entry"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "TargetFormatTypeDefinitions": {
+ "config:FormatOwner": "ACTOR02",
+ "config:TargetFormatTypeDefinitionEntries": {
+ "config:TargetFormatTypeDefinitionEntry": [
+ {
+ "config:FormatName": "ProprietaryIdentifier",
+ "config:Description": "This is an illustration of a proprietary identifier type specific to this CSP, which consists of the string \"CSP\" followed by 10 digits",
+ "config:FormatRegex": "^CSP[0-9]{10}$"
+ }
+ ]
+ }
+ },
+ "TargetingConfigurations": {
+ "config:TargetingConfiguration": [
+ {
+ "config:FormatName": "InternationalE164",
+ "config:FormatOwner": "ETSI",
+ "config:Guidance": "This configuration entry tells the LEA that they can use the ETSI standard format E164 number for LI of service A",
+ "config:AssociatedLIServiceTypes": {
+ "common:DictionaryEntry": [
+ {
+ "common:Owner": "ACTOR02",
+ "common:Name": "LIServiceTypes",
+ "common:Value": "ServiceA"
+ }
+ ]
+ },
+ "config:AssociatedLDRequestSubtypes": {},
+ "config:AssociatedLPRequestSubtypes": {}
+ },
+ {
+ "config:FormatName": "PropietaryIdentifier",
+ "config:FormatOwner": "ACTOR02",
+ "config:Guidance": "This configuration entry tells the LEA that they can use the propietary identifier format type described in the TargetFormatTypeDefinitions for LI of both Service A and Service B",
+ "config:AssociatedLIServiceTypes": {
+ "common:DictionaryEntry": [
+ {
+ "common:Owner": "ACTOR02",
+ "common:Name": "LIServiceTypes",
+ "common:Value": "ServiceA"
+ },
+ {
+ "common:Owner": "ACTOR02",
+ "common:Name": "LIServiceTypes",
+ "common:Value": "ServiceB"
+ }
+ ]
+ },
+ "config:AssociatedLDRequestSubtypes": {},
+ "config:AssociatedLPRequestSubtypes": {}
+ }
+ ]
+ },
+ "SupportedLIWorkflowEndpoints": {
+ "config:SupportedLIWorkflowEndpoint": [
+ {
+ "config:LIWorkflowEndpoint": {
+ "common:Owner": "ETSI",
+ "common:Name": "LIWorkflowEndpoint",
+ "common:Value": "NewAuthorisation"
+ },
+ "config:Guidance": "This tells the LEA what endpoint to use for new warrants. For brevity, in this example, this is the only endpoint specified.",
+ "config:URL": "https://ts103120.example.com/li/authorisation/new"
+ }
+ ]
+ },
+ "SupportedLPWorkflowEndpoints": {}
+ }
+ }
+ ]
+ }
+ }
+ }
+}
diff --git a/103120/examples/xml/request_config.xml b/103120/examples/xml/request_config.xml
new file mode 100644
index 0000000000000000000000000000000000000000..99a9c5bd673da4f90d6847637f120872100633fb
--- /dev/null
+++ b/103120/examples/xml/request_config.xml
@@ -0,0 +1,30 @@
+
+
+
+
+ XX
+ ACTOR01
+
+
+ XX
+ ACTOR02
+
+ eb6b002d-15c3-4c3b-af6c-27ede73641e5
+ 2024-06-10T08:50:31.000000Z
+
+ V1.16.1
+ XX
+ v1.0
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/103120/examples/xml/response_config.xml b/103120/examples/xml/response_config.xml
new file mode 100644
index 0000000000000000000000000000000000000000..e7007e9d5837859c44bcbb180990776f2fb9e432
--- /dev/null
+++ b/103120/examples/xml/response_config.xml
@@ -0,0 +1,106 @@
+
+
+
+
+ XX
+ ACTOR01
+
+
+ XX
+ ACTOR02
+
+ eb6b002d-15c3-4c3b-af6c-27ede73641e5
+ 2024-06-10T08:50:31.000000Z
+
+ V1.16.1
+ XX
+ v1.0
+
+
+
+
+
+
+ 0
+
+ 2024-05-10T08:52:32Z
+
+
+ ACTOR2
+ LIServiceTypes
+
+
+ ServiceA
+ This is a dictionary entry
+
+
+ ServiceB
+ This is a dictionary entry
+
+
+
+
+
+ ACTOR02
+
+
+ ProprietaryIdentifier
+ This is an illustration of a proprietary identifier type specific to this CSP, which consists of the string "CSP" followed by 10 digits
+ ^CSP[0-9]{10}$
+
+
+
+
+
+ InternationalE164
+ ETSI
+ This configuration entry tells the LEA that they can use the ETSI standard format E164 number for LI of service A
+
+
+ ACTOR02
+ LIServiceTypes
+ ServiceA
+
+
+
+
+
+
+ PropietaryIdentifier
+ ACTOR02
+ This configuration entry tells the LEA that they can use the propietary identifier format type described in the TargetFormatTypeDefinitions for LI of both Service A and Service B
+
+
+ ACTOR02
+ LIServiceTypes
+ ServiceA
+
+
+ ACTOR02
+ LIServiceTypes
+ ServiceB
+
+
+
+
+
+
+
+
+
+ ETSI
+ LIWorkflowEndpoint
+ NewAuthorisation
+
+ This tells the LEA what endpoint to use for new warrants. For brevity, in this example, this is the only endpoint specified.
+ https://ts103120.example.com/li/authorisation/new
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/103120/schema/json/ts_103120_Authorisation.schema.json b/103120/schema/json/ts_103120_Authorisation.schema.json
index 1c9a68ff3b802d056ed59f805808d31b2fed2c8e..942438fab1fce00708ebd1d7d6795daf49ae4a0f 100644
--- a/103120/schema/json/ts_103120_Authorisation.schema.json
+++ b/103120/schema/json/ts_103120_Authorisation.schema.json
@@ -1,12 +1,15 @@
{
"$id": "ts_103120_Authorisation_2020_09",
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
"$defs": {
"AuthorisationObject": {
"type": "object",
"properties": {
"@xsi:type": {
"type": "string",
- "enum": "{http://uri.etsi.org/03120/common/2020/09/Authorisation}AuthorisationObject"
+ "enum": [
+ "{http://uri.etsi.org/03120/common/2020/09/Authorisation}AuthorisationObject"
+ ]
},
"ObjectIdentifier": {
"$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier"
@@ -145,4 +148,4 @@
]
}
}
-}
\ No newline at end of file
+}
diff --git a/103120/schema/json/ts_103120_Common.schema.json b/103120/schema/json/ts_103120_Common.schema.json
index d11b4b4c22cbcf9a3c76619adf6a66da64e1ba8b..d5c94ea2cade3664a84b224a9eb4b02819be788e 100644
--- a/103120/schema/json/ts_103120_Common.schema.json
+++ b/103120/schema/json/ts_103120_Common.schema.json
@@ -1,5 +1,6 @@
{
"$id": "ts_103120_Common_2016_02",
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
"$defs": {
"ETSIVersion": {
"allOf": [
@@ -12,6 +13,18 @@
}
]
},
+ "DictionaryEntries": {
+ "type": "object",
+ "properties": {
+ "common:DictionaryEntry": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/DictionaryEntry"
+ }
+ }
+ },
+ "required": []
+ },
"DictionaryEntry": {
"type": "object",
"properties": {
@@ -161,4 +174,4 @@
]
}
}
-}
\ No newline at end of file
+}
diff --git a/103120/schema/json/ts_103120_Config.schema.json b/103120/schema/json/ts_103120_Config.schema.json
new file mode 100644
index 0000000000000000000000000000000000000000..40cdf92d5c767b5cc960a46d0dd0e7c8765a1c4e
--- /dev/null
+++ b/103120/schema/json/ts_103120_Config.schema.json
@@ -0,0 +1,151 @@
+{
+ "$id": "ts_103120_Config_2024_06",
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "$defs": {
+ "TargetFormatTypeDefinitions": {
+ "type": "object",
+ "properties": {
+ "config:FormatOwner": {
+ "$ref": "ts_103280_2017_07#/$defs/ShortString"
+ },
+ "config:TargetFormatTypeDefinitionEntries": {
+ "$ref": "#/$defs/TargetFormatTypeDefinitionEntries"
+ }
+ },
+ "required": [
+ "config:FormatOwner",
+ "config:TargetFormatTypeDefinitionEntries"
+ ]
+ },
+ "TargetFormatTypeDefinitionEntries": {
+ "type": "object",
+ "properties": {
+ "config:TargetFormatTypeDefinitionEntry": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TargetFormatTypeDefinitionEntry"
+ }
+ }
+ },
+ "required": []
+ },
+ "TargetFormatTypeDefinitionEntry": {
+ "type": "object",
+ "properties": {
+ "config:FormatName": {
+ "$ref": "ts_103280_2017_07#/$defs/ShortString"
+ },
+ "config:Description": {
+ "$ref": "ts_103280_2017_07#/$defs/LongString"
+ },
+ "config:FormatRegex": {
+ "$ref": "ts_103280_2017_07#/$defs/LongString"
+ }
+ },
+ "required": [
+ "config:FormatName",
+ "config:Description",
+ "config:FormatRegex"
+ ]
+ },
+ "TargetingConfigurations": {
+ "type": "object",
+ "properties": {
+ "config:TargetingConfiguration": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/TargetingConfiguration"
+ }
+ }
+ },
+ "required": []
+ },
+ "TargetingConfiguration": {
+ "type": "object",
+ "properties": {
+ "config:FormatName": {
+ "$ref": "ts_103280_2017_07#/$defs/ShortString"
+ },
+ "config:FormatOwner": {
+ "$ref": "ts_103280_2017_07#/$defs/ShortString"
+ },
+ "config:Guidance": {
+ "$ref": "ts_103280_2017_07#/$defs/LongString"
+ },
+ "config:AssociatedLIServiceTypes": {
+ "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntries"
+ },
+ "config:AssociatedLDRequestSubtypes": {
+ "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntries"
+ },
+ "config:AssociatedLPRequestSubtypes": {
+ "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntries"
+ }
+ },
+ "required": [
+ "config:FormatName",
+ "config:FormatOwner"
+ ]
+ },
+ "SupportedLIWorkflowEndpoints": {
+ "type": "object",
+ "properties": {
+ "config:SupportedLIWorkflowEndpoint": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/SupportedLIWorkflowEndpoint"
+ }
+ }
+ },
+ "required": []
+ },
+ "SupportedLIWorkflowEndpoint": {
+ "type": "object",
+ "properties": {
+ "config:LIWorkflowEndpoint": {
+ "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry"
+ },
+ "config:Guidance": {
+ "$ref": "ts_103280_2017_07#/$defs/LongString"
+ },
+ "config:URL": {
+ "$ref": "ts_103280_2017_07#/$defs/LongString"
+ }
+ },
+ "required": [
+ "config:LIWorkflowEndpoint",
+ "config:URL"
+ ]
+ },
+ "SupportedLPWorkflowEndpoints": {
+ "type": "object",
+ "properties": {
+ "config:SupportedLPWorkflowEndpoint": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/SupportedLPWorkflowEndpoint"
+ }
+ }
+ },
+ "required": []
+ },
+ "SupportedLPWorkflowEndpoint": {
+ "type": "object",
+ "properties": {
+ "config:LIWorkflowEndpoint": {
+ "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry"
+ },
+ "config:Guidance": {
+ "$ref": "ts_103280_2017_07#/$defs/LongString"
+ },
+ "config:URL": {
+ "$ref": "ts_103280_2017_07#/$defs/LongString"
+ }
+ },
+ "required": [
+ "config:LIWorkflowEndpoint",
+ "config:URL"
+ ]
+ }
+ }
+}
diff --git a/103120/schema/json/ts_103120_Core.schema.json b/103120/schema/json/ts_103120_Core.schema.json
index 63e2ad484c3ae7f709be33f17c0a23ec4a2872c8..1208029ec4c4accd914f47d61bbc148a3f8d29b1 100644
--- a/103120/schema/json/ts_103120_Core.schema.json
+++ b/103120/schema/json/ts_103120_Core.schema.json
@@ -1,5 +1,6 @@
{
"$id": "ts_103120_Core_2019_10",
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
"$defs": {
"ObjectIdentifier": {
"$ref": "ts_103280_2017_07#/$defs/UUID"
@@ -253,6 +254,17 @@
"required": [
"DELIVER"
]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "CONFIG": {
+ "$ref": "#/$defs/CONFIGRequest"
+ }
+ },
+ "required": [
+ "CONFIG"
+ ]
}
]
}
@@ -339,6 +351,17 @@
"required": [
"DELIVERResponse"
]
+ },
+ {
+ "type": "object",
+ "properties": {
+ "CONFIGResponse": {
+ "$ref": "#/$defs/CONFIGResponse"
+ }
+ },
+ "required": [
+ "CONFIGResponse"
+ ]
}
]
}
@@ -514,6 +537,38 @@
"Identifier"
]
},
+ "CONFIGRequest": {
+ "type": "object",
+ "properties": {},
+ "required": []
+ },
+ "CONFIGResponse": {
+ "type": "object",
+ "properties": {
+ "LastChanged": {
+ "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime"
+ },
+ "Dictionaries": {
+ "$ref": "ts_103280_Dictionaries_2019_10#/$defs/Dictionaries"
+ },
+ "TargetFormatTypeDefinitions": {
+ "$ref": "ts_103120_Config_2024_06#/$defs/TargetFormatTypeDefinitions"
+ },
+ "TargetingConfigurations": {
+ "$ref": "ts_103120_Config_2024_06#/$defs/TargetingConfigurations"
+ },
+ "SupportedLIWorkflowEndpoints": {
+ "$ref": "ts_103120_Config_2024_06#/$defs/SupportedLIWorkflowEndpoints"
+ },
+ "SupportedLPWorkflowEndpoints": {
+ "$ref": "ts_103120_Config_2024_06#/$defs/SupportedLPWorkflowEndpoints"
+ }
+ },
+ "required": [
+ "LastChanged",
+ "TargetingConfigurations"
+ ]
+ },
"HI1Object": {
"type": "object",
"properties": {
@@ -603,4 +658,4 @@
}
},
"$ref": "#/$defs/HI1Message"
-}
\ No newline at end of file
+}
diff --git a/103120/schema/json/ts_103120_Delivery.schema.json b/103120/schema/json/ts_103120_Delivery.schema.json
index f87f7f5844d4507a0ee1cc8b5a75a92120f71a13..83629501e4b693f4eb420a6091841efd1bd46829 100644
--- a/103120/schema/json/ts_103120_Delivery.schema.json
+++ b/103120/schema/json/ts_103120_Delivery.schema.json
@@ -1,12 +1,15 @@
{
"$id": "ts_103120_Delivery_2019_10",
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
"$defs": {
"DeliveryObject": {
"type": "object",
"properties": {
"@xsi:type": {
"type": "string",
- "enum": "{http://uri.etsi.org/03120/common/2019/10/Delivery}DeliveryObject"
+ "enum": [
+ "{http://uri.etsi.org/03120/common/2019/10/Delivery}DeliveryObject"
+ ]
},
"ObjectIdentifier": {
"$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier"
@@ -229,4 +232,4 @@
"EmbeddedXMLData": {},
"EmbeddedJSONData": {}
}
-}
\ No newline at end of file
+}
diff --git a/103120/schema/json/ts_103120_Document.schema.json b/103120/schema/json/ts_103120_Document.schema.json
index d844092e5afe97138055851e90ffb9c7b0e9dd61..3bc734cac2f658ea69bd37387766b213994aa00f 100644
--- a/103120/schema/json/ts_103120_Document.schema.json
+++ b/103120/schema/json/ts_103120_Document.schema.json
@@ -1,12 +1,15 @@
{
"$id": "ts_103120_Document_2020_09",
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
"$defs": {
"DocumentObject": {
"type": "object",
"properties": {
"@xsi:type": {
"type": "string",
- "enum": "{http://uri.etsi.org/03120/common/2020/09/Document}DocumentObject"
+ "enum": [
+ "{http://uri.etsi.org/03120/common/2020/09/Document}DocumentObject"
+ ]
},
"ObjectIdentifier": {
"$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier"
@@ -145,4 +148,4 @@
]
}
}
-}
\ No newline at end of file
+}
diff --git a/103120/schema/json/ts_103120_Notification.schema.json b/103120/schema/json/ts_103120_Notification.schema.json
index 84fbf046ca455b5e49221c0c268d2d6c345d0cd2..aadb98907307716417a45f3d2093a763ba495032 100644
--- a/103120/schema/json/ts_103120_Notification.schema.json
+++ b/103120/schema/json/ts_103120_Notification.schema.json
@@ -1,12 +1,15 @@
{
"$id": "ts_103120_Notification_2016_02",
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
"$defs": {
"NotificationObject": {
"type": "object",
"properties": {
"@xsi:type": {
"type": "string",
- "enum": "{http://uri.etsi.org/03120/common/2016/02/Notification}NotificationObject"
+ "enum": [
+ "{http://uri.etsi.org/03120/common/2016/02/Notification}NotificationObject"
+ ]
},
"ObjectIdentifier": {
"$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier"
@@ -100,4 +103,4 @@
]
}
}
-}
\ No newline at end of file
+}
diff --git a/103120/schema/json/ts_103120_Task.schema.json b/103120/schema/json/ts_103120_Task.schema.json
index 5bb92ac68d135247223f64027912958dbe924b4a..7df2c44c9f05c65213bf1263c2ec686a8fb93854 100644
--- a/103120/schema/json/ts_103120_Task.schema.json
+++ b/103120/schema/json/ts_103120_Task.schema.json
@@ -1,12 +1,15 @@
{
"$id": "ts_103120_Task_2020_09",
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
"$defs": {
"LITaskObject": {
"type": "object",
"properties": {
"@xsi:type": {
"type": "string",
- "enum": "{http://uri.etsi.org/03120/common/2020/09/Task}LITaskObject"
+ "enum": [
+ "{http://uri.etsi.org/03120/common/2020/09/Task}LITaskObject"
+ ]
},
"ObjectIdentifier": {
"$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier"
@@ -372,7 +375,9 @@
"properties": {
"@xsi:type": {
"type": "string",
- "enum": "{http://uri.etsi.org/03120/common/2020/09/Task}LDTaskObject"
+ "enum": [
+ "{http://uri.etsi.org/03120/common/2020/09/Task}LDTaskObject"
+ ]
},
"ObjectIdentifier": {
"$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier"
@@ -604,7 +609,9 @@
"properties": {
"@xsi:type": {
"type": "string",
- "enum": "{http://uri.etsi.org/03120/common/2020/09/Task}LPTaskObject"
+ "enum": [
+ "{http://uri.etsi.org/03120/common/2020/09/Task}LPTaskObject"
+ ]
},
"ObjectIdentifier": {
"$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier"
@@ -720,4 +727,4 @@
"required": []
}
}
-}
\ No newline at end of file
+}
diff --git a/103120/schema/json/ts_103120_TrafficPolicy.schema.json b/103120/schema/json/ts_103120_TrafficPolicy.schema.json
index 18bb9cfed8e694aa791d12b671ead4e94e4f8fd4..ef30ccae552f5d30a010ae4b955acb1f4b7e1fed 100644
--- a/103120/schema/json/ts_103120_TrafficPolicy.schema.json
+++ b/103120/schema/json/ts_103120_TrafficPolicy.schema.json
@@ -1,12 +1,15 @@
{
"$id": "ts_103120_TrafficPolicy_2022_07",
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
"$defs": {
"TrafficPolicyObject": {
"type": "object",
"properties": {
"@xsi:type": {
"type": "string",
- "enum": "{http://uri.etsi.org/03120/common/2022/07/TrafficPolicy}TrafficPolicyObject"
+ "enum": [
+ "{http://uri.etsi.org/03120/common/2022/07/TrafficPolicy}TrafficPolicyObject"
+ ]
},
"ObjectIdentifier": {
"$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier"
@@ -79,7 +82,9 @@
"properties": {
"@xsi:type": {
"type": "string",
- "enum": "{http://uri.etsi.org/03120/common/2022/07/TrafficPolicy}TrafficRuleObject"
+ "enum": [
+ "{http://uri.etsi.org/03120/common/2022/07/TrafficPolicy}TrafficRuleObject"
+ ]
},
"ObjectIdentifier": {
"$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier"
@@ -307,4 +312,4 @@
]
}
}
-}
\ No newline at end of file
+}
diff --git a/103120/schema/xsd/ts_103120_Common.xsd b/103120/schema/xsd/ts_103120_Common.xsd
index 4bc23386d1eed2513260a9f433a4d871b8b211b7..cea9e81d16e5cbac79c0c660d90c65b102dec25a 100644
--- a/103120/schema/xsd/ts_103120_Common.xsd
+++ b/103120/schema/xsd/ts_103120_Common.xsd
@@ -6,6 +6,11 @@
+
+
+
+
+
diff --git a/103120/schema/xsd/ts_103120_Config.xsd b/103120/schema/xsd/ts_103120_Config.xsd
new file mode 100644
index 0000000000000000000000000000000000000000..bad5d2ac6cc0581c606de9c6417eec84a862d577
--- /dev/null
+++ b/103120/schema/xsd/ts_103120_Config.xsd
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/103120/schema/xsd/ts_103120_Core.xsd b/103120/schema/xsd/ts_103120_Core.xsd
index e0b772cd9f99c257b580e43b12dab8133c60c808..ce8fb723a620adbb15b593decffd12b3da168de4 100644
--- a/103120/schema/xsd/ts_103120_Core.xsd
+++ b/103120/schema/xsd/ts_103120_Core.xsd
@@ -1,6 +1,8 @@
-
+
+
+
@@ -71,6 +73,7 @@
+
@@ -84,6 +87,7 @@
+
@@ -158,6 +162,17 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/testing/xsd_compile_targets.json b/testing/xsd_compile_targets.json
index bb4f13ec91434c2818693a6a8271f4ae62ec0e36..8aa1774d0537a3d02bc7d45b5bba7c455346c196 100644
--- a/testing/xsd_compile_targets.json
+++ b/testing/xsd_compile_targets.json
@@ -19,7 +19,9 @@
"103280/TS_103_280.xsd",
"103221-1/examples/ExampleGenericObjects.xsd",
"103120/schema/xsd/ts_103120_Common.xsd",
+ "103120/schema/xsd/ts_103120_Config.xsd",
"103120/schema/xsd/ts_103120_Core.xsd",
+ "103120/dictionaries/ts_103120_Dictionaries.xsd",
"103120/schema/xsd/ts_103120_TrafficPolicy.xsd",
"testing/deps/xmldsig/xmldsig-core-schema.xsd"
],
@@ -39,7 +41,9 @@
"supportingSchemas" : [
"103120/schema/xsd/ts_103120_Authorisation.xsd",
"103120/schema/xsd/ts_103120_Common.xsd",
+ "103120/schema/xsd/ts_103120_Config.xsd",
"103120/schema/xsd/ts_103120_Delivery.xsd",
+ "103120/dictionaries/ts_103120_Dictionaries.xsd",
"103120/schema/xsd/ts_103120_Document.xsd",
"103120/schema/xsd/ts_103120_Notification.xsd",
"103120/schema/xsd/ts_103120_Task.xsd",
@@ -58,6 +62,8 @@
"103280/TS_103_280.xsd",
"103120/schema/xsd/ts_103120_Common.xsd",
"103120/schema/xsd/ts_103120_Core.xsd",
+ "103120/schema/xsd/ts_103120_Config.xsd",
+ "103120/dictionaries/ts_103120_Dictionaries.xsd",
"103120/schema/xsd/ts_103120_Task.xsd",
"testing/deps/xmldsig/xmldsig-core-schema.xsd",
"103707/examples/FooServiceSchema.xsd"
diff --git a/utils/json_validator.py b/utils/json_validator.py
index e9ff0c03a2b121ba5f9a429221288158c0bdcd03..82ee19126566de61ac36db86a808df360c32f11d 100644
--- a/utils/json_validator.py
+++ b/utils/json_validator.py
@@ -38,7 +38,7 @@ class JsonValidator:
class TS103120Validator (JsonValidator):
def __init__ (self, path_to_repo):
repo_path = Path(path_to_repo)
- schema_dirs = [str(repo_path / "103120/schema/json"), str("103280/")]
+ schema_dirs = [str(repo_path / "103120/schema/json"), str("103120/dictionaries/"), str("103280/")]
core_schema = str(repo_path / "103120/schema/json/ts_103120_Core.schema.json")
JsonValidator.__init__(self, core_schema, schema_dirs)
request_fragment_schema = { "$ref" : "ts_103120_Core_2019_10#/$defs/RequestPayload" }
@@ -47,15 +47,18 @@ class TS103120Validator (JsonValidator):
self._response_fragment_validator = Draft202012Validator(response_fragment_schema, resolver=self._resolver)
def expand_request_response_exception (self, ex):
+ print(ex.schema_path)
if list(ex.schema_path) == ['properties', 'Payload', 'oneOf']:
logging.info ("Error detected validating payload oneOf - attempting explicit validation...")
if 'RequestPayload' in instance_doc['Payload'].keys():
+ logging.info("Error in RequestPayload")
ret_list = list(chain(*[self.expand_action_exception(x) for x in self._request_fragment_validator.iter_errors(instance_doc['Payload']['RequestPayload'])]))
for r in ret_list:
r.path = ex.path + r.path
return ret_list
elif 'ResponsePayload' in instance_doc['Payload'].keys():
- ret_list = list(chain(*[self.expand_action_exception(x) for x in self._request_fragment_validator.iter_errors(instance_doc['Payload']['ResponsePayload'])]))
+ logging.info("Error in ResponsePayload")
+ ret_list = list(chain(*[self.expand_action_exception(x) for x in self._response_fragment_validator.iter_errors(instance_doc['Payload']['ResponsePayload'])]))
for r in ret_list:
r.path = ex.path + r.path
return ret_list
@@ -68,9 +71,18 @@ class TS103120Validator (JsonValidator):
def expand_action_exception (self, ex):
logging.error("Error detected in ActionRequests/ActionResponses")
error_path = list(ex.schema_path)
+ if error_path == ['oneOf']:
+ logging.error('Failed validating verb ')
+ #temp
+ configResponse = ex.instance['ActionResponses']['ActionResponse'][0]['CONFIGResponse']
+ temp_validator = Draft202012Validator({"$ref" : 'ts_103120_Core_2019_10#/$defs/CONFIGResponse'}, resolver=self._resolver)
+ inner_errors = list(temp_validator.iter_errors(configResponse))
+ for error in inner_errors:
+ print(error)
if error_path != ['properties', 'ActionRequests', 'properties', 'ActionRequest', 'items', 'allOf', 1, 'oneOf'] and error_path != ['properties', 'ActionResponses', 'properties', 'ActionResponse', 'items', 'allOf', 1, 'oneOf']:
logging.error("Error not in inner Request/Response allOf/oneOf constraint")
return[ex]
+ # TODO - look at this again, won't work for responses...
j = ex.instance
j.pop('ActionIdentifier') # Remove ActionIdentifier - one remaining key will be the verb
verb = list(j.keys())[0]
@@ -131,15 +143,15 @@ if __name__ == "__main__":
logging.debug(f"Arguments: {args}")
if (args.ts103120):
- v = TS103120Validator("./")
+ validator = TS103120Validator("./")
else:
- v = JsonValidator(args.schema, args.schemadir)
+ validator = JsonValidator(args.schema, args.schemadir)
logging.info(f"Taking instance doc input from {args.input.name}")
instance_doc = json.loads(args.input.read())
args.input.close()
- errors = v.validate(instance_doc)
+ errors = validator.validate(instance_doc)
for error in errors:
if args.printerror == 2:
logging.error(error)
diff --git a/utils/translate/SequenceMapping.py b/utils/translate/SequenceMapping.py
index 4dc5c93e8a70c5a68cc753891032789d268c1be4..341ac51469a8b0f9ad5fd0c66ae9c45aac93f277 100644
--- a/utils/translate/SequenceMapping.py
+++ b/utils/translate/SequenceMapping.py
@@ -35,7 +35,7 @@ class SequenceMapping(ComplexTypeMapping):
# mapped_type['__DESCENDENT_OF__'] = TypeMapping.get_ref_for(xst.base_type, xst.namespaces[''])
mapped_type['properties']['@xsi:type'] = {
"type" : "string",
- "enum" : xst.name
+ "enum" : [xst.name]
}
mapped_type['required'].append('@xsi:type')
# if xst.abstract:
diff --git a/utils/translate/__init__.py b/utils/translate/__init__.py
index ba05008f9be181798aad7578d1cb1b75ee595f71..86a33468c8e281b7d9a745261fc96a1b7905e17f 100644
--- a/utils/translate/__init__.py
+++ b/utils/translate/__init__.py
@@ -20,6 +20,7 @@ mappings = [
def translate_schema (schema_path: str, ns_to_id_map: dict, schema_locations = []):
js = {
"$id" : "?",
+ "$schema" : "https://json-schema.org/draft/2020-12/schema",
"$defs" : {}
}
diff --git a/utils/translate_spec.py b/utils/translate_spec.py
index 01880ff872f4c25cc447f1be3825254c7fc44cda..e950b4ae12cbd09066593774f8b560a2805cce4d 100644
--- a/utils/translate_spec.py
+++ b/utils/translate_spec.py
@@ -107,7 +107,7 @@ if __name__ == "__main__":
]
}
- json_string = json.dumps(js, indent=2)
+ json_string = json.dumps(js, indent=2) + "\n"
if "Core" in schema_tuple[1]:
json_string = json_string.replace('"$ref": "#/$defs/HI1Object"', '"$ref": "#/$defs/ConcreteHI1Object"')
diff --git a/utils/ts103120_config.json b/utils/ts103120_config.json
index 4c8bce711503acec8132fadb0e6e7ed2a1fe194d..af7330ce973c2377f5b377f54a97841bfe255008 100644
--- a/utils/ts103120_config.json
+++ b/utils/ts103120_config.json
@@ -6,11 +6,18 @@
"./103120/schema/xsd/ts_103120_Common.xsd" : {
"prefix" : "common"
},
+ "./103120/schema/xsd/ts_103120_Config.xsd" : {
+ "prefix" : "config"
+ },
"./103120/schema/xsd/ts_103120_Core.xsd" : {
},
"./103120/schema/xsd/ts_103120_Delivery.xsd" : {
"prefix" : "delivery"
},
+ "./103120/dictionaries/ts_103120_Dictionaries.xsd" : {
+ "prefix" : "dictionaries",
+ "skip" : true
+ },
"./103120/schema/xsd/ts_103120_Document.xsd" : {
"prefix" : "doc"
},
diff --git a/utils/ts103120_dictionaries.json b/utils/ts103120_dictionaries.json
new file mode 100644
index 0000000000000000000000000000000000000000..1e779f835514ada6c822b94d7023873585139a9f
--- /dev/null
+++ b/utils/ts103120_dictionaries.json
@@ -0,0 +1,8 @@
+{
+ "schemas" : {
+ "./103120/dictionaries/ts_103120_Dictionaries.xsd" : {
+ "prefix" : "dictionaries"
+ }
+ },
+ "output" : "./103120/dictionaries"
+}
diff --git a/utils/xml_to_json.py b/utils/xml_to_json.py
index a89777f553533ee2c7b008bdc170ee0a605159b9..6c7f126fff5fcb390eccbd32d856f500c4cad99a 100644
--- a/utils/xml_to_json.py
+++ b/utils/xml_to_json.py
@@ -66,7 +66,12 @@ coerce_to_list = [
'task:LDTaskFlag',
'task:TrafficPolicyReference',
'tp:TrafficRuleReference',
- 'tp:Criteria'
+ 'tp:Criteria',
+ 'common:DictionaryEntry',
+ 'dictionaries:Dictionary',
+ 'config:TargetFormatTypeDefinitionEntry',
+ 'config:SupportedLIWorkflowEndpoint',
+ 'config:SupportedLPWorkflowEndpoint',
]
coerce_to_int = [
@@ -81,6 +86,18 @@ coerce_to_bool = [
'delivery:LastSequence'
]
+coerce_to_empty = [
+ 'CONFIG'
+]
+
+coerce_null_to_empty = [
+ 'SupportedLIWorkflowEndpoints',
+ 'SupportedLPWorkflowEndpoints',
+ 'config:AssociatedLDRequestSubtypes',
+ 'config:AssociatedLPRequestSubtypes',
+ 'config:AssociatedLIRequestSubtypes',
+]
+
def postprocessor (path, key, value):
if key == "@xsi:type":
object_name = value.split(":")[-1]
@@ -91,6 +108,11 @@ def postprocessor (path, key, value):
return key, int(value)
if key in coerce_to_bool:
return key, bool(value)
+ if key in coerce_to_empty:
+ return key, {}
+ if key in coerce_null_to_empty:
+ if value is None:
+ return key, {}
return key, value
if __name__ == "__main__":