diff --git a/102232-1/LI-PS-PDU.asn b/102232-1/LI-PS-PDU.asn index f3b23292df3b57d4fce23a3f0ea8a975667248c8..10da9cfc2348d79c26fb18c938e21d2aefb3692d 100644 --- a/102232-1/LI-PS-PDU.asn +++ b/102232-1/LI-PS-PDU.asn @@ -1,5 +1,5 @@ LI-PS-PDU -{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version37(37)} +{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version38(38)} DEFINITIONS IMPLICIT TAGS ::= @@ -39,7 +39,8 @@ IMPORTS -- from ETSI TS 102 232-3 [6] IPCC, IPIRI, - IPIRIOnly + IPIRIOnly, + IPIRIPacketReport FROM IPAccessPDU {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPAccess(3) version17(17)} @@ -205,7 +206,7 @@ IMPORTS lawfulInterceptDomainId OBJECT IDENTIFIER ::= {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2)} -li-psDomainId OBJECT IDENTIFIER ::= {lawfulInterceptDomainId li-ps(5) genHeader(1) version37(37)} +li-psDomainId OBJECT IDENTIFIER ::= {lawfulInterceptDomainId li-ps(5) genHeader(1) version38(38)} -- ==================== -- Top-level definition @@ -421,7 +422,8 @@ IRIContents ::= CHOICE confIRI [16] ConfIRI, proseIRI [17] ProSeIRI, gcseIRI [18] GcseIRI, - threeGPP33128DefinedIRI [19] OCTET STRING (CONTAINING TS33128Payloads.IRIPayload) + threeGPP33128DefinedIRI [19] OCTET STRING (CONTAINING TS33128Payloads.IRIPayload), + iPIRIPacketReport [20] IPAccessPDU.IPIRIPacketReport } UMTSIRI ::= CHOICE @@ -515,9 +517,12 @@ IntegrityCheck ::= SEQUENCE -- used to insert the appropriate ASN.1 DER or BER encoded structure for the -- DSS/DSA signature as described in IETF RFC 3279 [43], clause 2.2.2. ..., - hashAlgorithm [4] HashAlgorithm OPTIONAL + hashAlgorithm [4] HashAlgorithm OPTIONAL, -- Clarifies the hash function if checkType is hash(1). -- If used, it shall be present for each checkType hash(1). + signatureAlgorithm [5] SignatureAlgorithm OPTIONAL + -- Clarifies the signature algorithm if checkType is signature(2). + -- If used, it shall be present for each checkType signature(2). } CheckType ::= ENUMERATED @@ -547,6 +552,15 @@ HashAlgorithm ::= ENUMERATED ... } +SignatureAlgorithm ::= ENUMERATED +{ + dSA(1), + -- Included for legacy/migration purposes only, not to be used for new implementations + eCDSA(2), + edDSA(3), + ... +} + Option ::= CHOICE { pDUAcknowledgement [0] NULL, diff --git a/102232-3/IPAccessPDU.asn b/102232-3/IPAccessPDU.asn index f418ce58e6cc97eb20f6e4527167b9ed3f105cb6..b376b34c55fb733f9e270ccd6a70544b7aa398dd 100644 --- a/102232-3/IPAccessPDU.asn +++ b/102232-3/IPAccessPDU.asn @@ -1,5 +1,5 @@ IPAccessPDU -{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPAccess(3) version17(17)} +{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPAccess(3) version18(18)} DEFINITIONS IMPLICIT TAGS ::= BEGIN @@ -9,17 +9,18 @@ IMPORTS IPAddress, Location FROM LI-PS-PDU - {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version37(37)}; + {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version38(38)}; -- ============================ -- Object Identifier Definition -- ============================ -iPAccessPDUObjId RELATIVE-OID ::= {li-ps(5) iPAccess(3) version17(17)} +iPAccessPDUObjId RELATIVE-OID ::= {li-ps(5) iPAccess(3) version18(18)} iPIRIObjId RELATIVE-OID ::= {iPAccessPDUObjId iRI(1)} iPCCObjId RELATIVE-OID ::= {iPAccessPDUObjId cC(2)} iPIRIOnlyObjId RELATIVE-OID ::= {iPAccessPDUObjId iRIOnly(3)} +iPIRIPacketReportObjId RELATIVE-OID ::= {iPAccessPDUObjId iRIPacketReport(4)} -- definitions are relative to -- {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulintercept(2)} @@ -270,11 +271,14 @@ FramedRoute ::= CHOICE ... } - -- ===================================================== -- Intercept-related information for IRI-Only intercepts -- ===================================================== +-- The PDHR and PDSR mechanisms have been superseded by +-- the IPPR mechanism which is defined in clause 6.2.5. +-- New implementations should use the IPPR mechanism. + IPIRIOnly ::= SEQUENCE { iPIRIOnlyObjId [0] RELATIVE-OID, @@ -371,5 +375,72 @@ PDSRSummaryTrigger ::= ENUMERATED ... } +-- =================================================== +-- Intercept-related information for IP Packet Reports +-- =================================================== + +IPIRIPacketReport ::= SEQUENCE +{ + iPIRIPacketReportObjId [0] RELATIVE-OID, + report [1] PacketReport, + ... +} + +PacketReport ::= CHOICE +{ + header [1] PacketReportHeader, + summary [2] PacketReportSummary, + ... +} + +PacketReportHeader ::= SEQUENCE +{ + header [1] OCTET STRING, + ... +} + +PacketReportSummary ::= SEQUENCE +{ + header [1] OCTET STRING, + indications [2] PacketReportIndications, + trigger [3] PacketReportTrigger, + packetCount [4] INTEGER OPTIONAL, + byteCount [5] INTEGER OPTIONAL, + firstTimestamp [6] GeneralizedTime OPTIONAL, + lastTimestamp [7] GeneralizedTime OPTIONAL, + ... +} + +PacketReportTrigger ::= ENUMERATED +{ + flowStart(1), + flowEnd(2), + flowTimeout(3), + flowTimerExpiration(4), + flowPacketCount(5), + flowByteCount(6), + sessionTimerExpiration(7), + sessionPacketCount(8), + sessionByteCount(9), + reportEnd(10), + ... +} + +PacketReportIndications ::= BIT STRING +{ + zeroedIPv4TotalLength(0), + zeroedIPv4Flags(1), + zeroedIPv4TimeToLive(2), + zeroedIPv4HeaderChecksum(3), + zeroedIPv6PayloadLength(4), + removedIPv6ExtensionHeaders(5), + zeroedTCPSequenceNumber(6), + zeroedTCPAcknowledgementNumber(7), + zeroedTCPFlags(8), + zeroedTCPWindowSize(9), + zeroedTCPChecksum(10), + zeroedUDPLength(11), + zeroedUDPChecksum(12) +} END -- end of IPAccessPDU diff --git a/102232-5/IPMultimediaPDU.asn b/102232-5/IPMultimediaPDU.asn index f2e7dfa88a597551bb471c07d0f32c7fdfa89e15..402e0c42436e2ecc3eca3db415da08fe97602d30 100644 --- a/102232-5/IPMultimediaPDU.asn +++ b/102232-5/IPMultimediaPDU.asn @@ -1,5 +1,5 @@ IPMultimediaPDU -{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPMultimedia(5) version16(16)} +{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPMultimedia(5) version17(17)} DEFINITIONS IMPLICIT TAGS ::= BEGIN @@ -9,7 +9,7 @@ IMPORTS IPAddress, Location FROM LI-PS-PDU - {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version35(35)}; + {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version37(37)}; @@ -17,7 +17,7 @@ IMPORTS -- Object Identifier Definition -- ============================ -iPMultimediaPDUObjId RELATIVE-OID ::= {li-ps(5) iPMultimedia(5) version16(16)} +iPMultimediaPDUObjId RELATIVE-OID ::= {li-ps(5) iPMultimedia(5) version17(17)} iPMMIRIObjId RELATIVE-OID ::= {iPMultimediaPDUObjId iRI(1)} iPMMCCObjId RELATIVE-OID ::= {iPMultimediaPDUObjId cC(2)} @@ -120,10 +120,13 @@ IPIRIContents ::= CHOICE iRIOnlyOriginalIPMMMessage [5] OCTET STRING, -- Copy of the IP MM signalling packet including the original IP and UDP/TCP headers -- see clause 5.2.6. - iRIOnlySIPMessage [6] SIPMessage + iRIOnlySIPMessage [6] SIPMessage, -- Copy of the SIP content and the source and destination IP address of the intercepted -- SIP message as transmitted on the network layer. -- (see clause 5.2.6 and 5.2.7). + iRIOnlyRTPPacket [7] OCTET STRING + -- Copy of the RTP packet containing telephony events including the original IP and UDP headers + -- (see clause 5.2.8.1). } SIPMessage ::= SEQUENCE diff --git a/102657/RDMessage.asn b/102657/RDMessage.asn index 3e1f090491e3615c7e53c0aad4feeba932d203ac..df26aaf28a59660a7aa857679a42500ac01b20e3 100644 --- a/102657/RDMessage.asn +++ b/102657/RDMessage.asn @@ -1,4 +1,4 @@ -RDMessage {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) retainedData(3) rdHeader(0) version30(30)} +RDMessage {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) retainedData(3) rdHeader(0) version31(31)} DEFINITIONS IMPLICIT TAGS ::= @@ -12,7 +12,7 @@ BEGIN retainedDataDomainId OBJECT IDENTIFIER ::= {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) retainedData(3)} -- rdHeader -rdHeaderId OBJECT IDENTIFIER ::= {retainedDataDomainId rdHeader(0) version30(30)} +rdHeaderId OBJECT IDENTIFIER ::= {retainedDataDomainId rdHeader(0) version31(31)} -- ====================================== -- Top level definitions for RDHI wrapper @@ -1988,7 +1988,8 @@ MultimediaPartyInformation ::= SEQUENCE octetsDownloaded [16] INTEGER OPTIONAL, accessNetworkInformation [17] SEQUENCE OF AccessNetworkInfo OPTIONAL, privateUserIdentity [18] IMPI OPTIONAL, - iMEI [19] IMEI OPTIONAL + iMEI [19] IMEI OPTIONAL, + cellularNetworkInfo [20] CellularNetworkInfo OPTIONAL } MultimediaCallID ::= UTF8String @@ -2110,6 +2111,30 @@ PaniHeaderInfo ::= SEQUENCE -- Complete content of the P-Access-Network-Info header field } +CellularNetworkInfo ::= SEQUENCE +{ + accessType [1] UTF8String OPTIONAL, + -- ASCII string "3GPP-GERAN","3GPP-UTRAN-FDD", ... : see ETSI TS 124 229 [xx] clause 7.2.15.3 + cellularAccessInfo [2] CellularAccessInfo OPTIONAL, + cniHeaderContent [3] UTF8String OPTIONAL, + -- Complete content of the Cellular-Network-Info header field + ... +} + +CellularAccessInfo ::= SEQUENCE +{ + cgi3gpp [1] UTF8String OPTIONAL, + -- cgi-3gpp parameter in ASCII representation. See ETSI TS 124 229 [xx] clause 7.2.15.3 + utranCellId3gpp [2] UTF8String OPTIONAL, + -- utran-cell-id-3gpp parameter in ASCII representation. See ETSI TS 124 229 [xx] clause 7.2.15.3 + ci3gpp2 [3] UTF8String OPTIONAL, + -- ci-3gpp2 parameter in ASCII representation. See ETSI TS 124 229 [xx] clause 7.2.15.3 + ci3gpp2femto [4] UTF8String OPTIONAL, + -- ci-3gpp2-femto parameter in ASCII representation. See ETSI TS 124 229 [xx] clause 7.2.15.3 + cellInfoAge [5] INTEGER OPTIONAL, + -- cell-info-age parameter. See ETSI TS 124 229 [xx] clause 7.2.15.3 + ... +} -- ============================== -- Definitions of Billing Data diff --git a/102657/RDMessage.xsd b/102657/RDMessage.xsd index ce0a971c8774460f95857dad176c49ae3aa106d2..a52976f6652d67787dff6d19a9ccb5839c31bf6f 100644 --- a/102657/RDMessage.xsd +++ b/102657/RDMessage.xsd @@ -1,8 +1,8 @@ - + - XSD translated from ASN.1 derived from outcome of TS 102 657 v2.3.1 + XSD translated from ASN.1 derived from outcome of TS 102 657 v2.4.1 @@ -2961,6 +2961,7 @@ + @@ -3270,6 +3271,23 @@ + + + + + + + + + + + + + + + + + diff --git a/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml b/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml index 242ca814aded62a7b57ce2a35da92610883b11c1..eb46ca4e0c29cfb840e37c51641b76d430f1e3bd 100644 --- a/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml +++ b/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml @@ -493,6 +493,10 @@ TS102232-7 Handed over in TS 102 232 part 7 format + + TS103707 + Handed over as ETSI TS 103 707, using the DeliveryObject as described in clause 10 + @@ -628,6 +632,10 @@ TS103120 Handed over using the DeliveryObject as described in clause 10 + + TS103705 + Handed over as ETSI TS 103 705, using the DeliveryObject as described in clause 10 + TS103707 Handed over as ETSI TS 103 707, using the DeliveryObject as described in clause 10 @@ -715,6 +723,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 @@ -728,6 +786,10 @@ TS102657-XML Delivery according to ETSI TS 102 657 using XML encoding + + TS103705 + Delivery according to ETSI TS 103 705, using JSON encoding + TS103707 Delivery according to ETSI TS 103 707 diff --git a/103120/examples/json/request4-TargetIdentifierSubtype.json b/103120/examples/json/request4-TargetIdentifierSubtype.json new file mode 100644 index 0000000000000000000000000000000000000000..4f2a309ce454c9fc497d0591f64781e640d47f7a --- /dev/null +++ b/103120/examples/json/request4-TargetIdentifierSubtype.json @@ -0,0 +1,103 @@ +{ + "@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": "c02358b2-76cf-4ba4-a8eb-f6436ccaea2e", + "Timestamp": "2019-09-30T13:37:00.000000Z", + "Version": { + "ETSIVersion": "V1.13.1", + "NationalProfileOwner": "XX", + "NationalProfileVersion": "v1.0" + } + }, + "Payload": { + "RequestPayload": { + "ActionRequests": { + "ActionRequest": [ + { + "ActionIdentifier": 0, + "CREATE": { + "HI1Object": { + "@xsi:type": "{http://uri.etsi.org/03120/common/2020/09/Authorisation}AuthorisationObject", + "ObjectIdentifier": "7dbbc880-8750-4d3c-abe7-ea4a17646045", + "CountryCode": "XX", + "OwnerIdentifier": "ACTOR01", + "auth:AuthorisationReference": "W000001", + "auth:AuthorisationTimespan": { + "auth:StartTime": "2019-09-30T12:00:00Z", + "auth:EndTime": "2019-12-01T12:00:00Z" + } + } + } + }, + { + "ActionIdentifier": 1, + "CREATE": { + "HI1Object": { + "@xsi:type": "{http://uri.etsi.org/03120/common/2020/09/Task}LDTaskObject", + "ObjectIdentifier": "2b36a78b-b628-416d-bd22-404e68a0cd36", + "CountryCode": "XX", + "OwnerIdentifier": "ACTOR01", + "AssociatedObjects": { + "AssociatedObject": [ + "7dbbc880-8750-4d3c-abe7-ea4a17646045" + ] + }, + "task:Reference": "XX-ACTOR01-1234", + "task:RequestDetails": { + "task:Type": { + "common:Owner": "ETSI", + "common:Name": "RequestType", + "common:Value": "SubscriberData" + }, + "task:StartTime": "2019-09-30T12:00:00Z", + "task:EndTime": "2019-12-30T12:00:00Z", + "task:RequestValues": { + "task:RequestValue": [ + { + "task:FormatType": { + "task:FormatOwner": "ETSI", + "task:FormatName": "ServiceAccessIdentifier" + }, + "task:Value": "123456789" + } + ] + }, + "task:TargetIdentifierSubtype": { + "common:Owner": "ACTOR02", + "common:Name": "TargetIdentifierSubtype", + "common:Value": "AccountTypeB" + } + }, + "task:DeliveryDetails": { + "task:LDDeliveryDestination": [ + { + "task:DeliveryAddress": { + "task:IPv4Address": "192.0.2.0" + } + } + ] + }, + "task:CSPID": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + } + } + } + } + ] + } + } + } +} diff --git a/103120/examples/json/request_config.json b/103120/examples/json/request_config.json new file mode 100644 index 0000000000000000000000000000000000000000..e8e73308951445e44fa219b8d0deae938ada5709 --- /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, + "GETCSPCONFIG": {} + } + ] + } + } + } +} diff --git a/103120/examples/json/response2.json b/103120/examples/json/response2.json index 829c8a7f1c93b836b655e60706a052513d319f04..f049e4064cd703e2395f6d9d469aa4fcb3ed1c9f 100644 --- a/103120/examples/json/response2.json +++ b/103120/examples/json/response2.json @@ -33,7 +33,7 @@ "ObjectIdentifier": "7dbbc880-8750-4d3c-abe7-ea4a17646045", "CountryCode": "XX", "OwnerIdentifier": "ACTOR01", - "Generation": "1", + "Generation": 1, "LastChanged": "2015-09-01T12:00:00Z", "auth:AuthorisationReference": "W000001", "auth:AuthorisationStatus": { @@ -46,7 +46,7 @@ "auth:EndTime": "2015-12-01T12:00:00Z" }, "auth:AuthorisationInvalidReason": { - "ErrorCode": "3000", + "ErrorCode": 3000, "ErrorDescription": "The Authorisation is not associated with a valid Warrant Document Object" } } @@ -60,7 +60,7 @@ "ObjectIdentifier": "2b36a78b-b628-416d-bd22-404e68a0cd36", "CountryCode": "XX", "OwnerIdentifier": "ACTOR01", - "Generation": "1", + "Generation": 1, "AssociatedObjects": { "AssociatedObject": [ "7dbbc880-8750-4d3c-abe7-ea4a17646045" @@ -105,7 +105,7 @@ "UniqueIdentifier": "ACTOR02" }, "task:InvalidReason": { - "ErrorCode": "3000", + "ErrorCode": 3000, "ErrorDescription": "The associated Authorisation is in an Invalid state" } } diff --git a/103120/examples/json/response3.json b/103120/examples/json/response3.json index 87bca95d06ebcc7bf42e585b21732cde66e5a14c..b2bbbc43f2a38be8baacbe8dab385244cabf8d2a 100644 --- a/103120/examples/json/response3.json +++ b/103120/examples/json/response3.json @@ -41,7 +41,7 @@ "ObjectIdentifier": "7dbbc880-8750-4d3c-abe7-ea4a17646045", "CountryCode": "XX", "OwnerIdentifier": "ACTOR01", - "Generation": "2", + "Generation": 2, "AssociatedObjects": { "AssociatedObject": [ "4193f541-5e19-468e-b4a3-1c636ce115e9" diff --git a/103120/examples/json/response_config.json b/103120/examples/json/response_config.json new file mode 100644 index 0000000000000000000000000000000000000000..d0f4a1f82b231b8fb273bb2a6d747d533a482bc6 --- /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, + "GETCSPCONFIGResponse": { + "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/request1.xml b/103120/examples/xml/request1.xml index 5cba416de1209b867cb451655ca3a840979b5832..b5db0381a57b80f9dc4687901711355c546d5c30 100644 --- a/103120/examples/xml/request1.xml +++ b/103120/examples/xml/request1.xml @@ -56,6 +56,16 @@ 442079460223 + + ETSI + TaskServiceType + DataType1 + + + CSP01 + TargetIdentifierSubtype + AccountType1 + ETSI diff --git a/103120/examples/xml/request4-TargetIdentifierSubtype.xml b/103120/examples/xml/request4-TargetIdentifierSubtype.xml new file mode 100644 index 0000000000000000000000000000000000000000..99f201a98309daea4d2f35f510d0acb3b873e7a6 --- /dev/null +++ b/103120/examples/xml/request4-TargetIdentifierSubtype.xml @@ -0,0 +1,114 @@ + + + +
+ + XX + ACTOR01 + + + XX + ACTOR02 + + c02358b2-76cf-4ba4-a8eb-f6436ccaea2e + 2019-09-30T13:37:00.000000Z + + V1.13.1 + XX + v1.0 + +
+ + + + + 0 + + + 7dbbc880-8750-4d3c-abe7-ea4a17646045 + XX + ACTOR01 + W000001 + + 2019-09-30T12:00:00Z + 2019-12-01T12:00:00Z + + + + + + 1 + + + 2b36a78b-b628-416d-bd22-404e68a0cd36 + XX + ACTOR01 + + 7dbbc880-8750-4d3c-abe7-ea4a17646045 + + XX-ACTOR01-1234 + + + ETSI + RequestType + SubscriberData + + 2019-09-30T12:00:00Z + 2019-12-30T12:00:00Z + + + + ETSI + ServiceAccessIdentifier + + 123456789 + + + + ACTOR02 + TargetIdentifierSubtype + AccountTypeB + + + + + + 192.0.2.0 + + + + + XX + ACTOR02 + + + + + + + +
diff --git a/103120/examples/xml/request4.xml b/103120/examples/xml/request4.xml index 4e0671a4017f24fb50e619d97bdabef4adc054cd..b99fa9e97688fb78e9168dff4858781cc659c81f 100644 --- a/103120/examples/xml/request4.xml +++ b/103120/examples/xml/request4.xml @@ -47,6 +47,11 @@ XX-ACTOR01-1234 + + ETSI + RequestType + SubscriberData + 2019-09-30T12:00:00Z 2019-12-30T12:00:00Z diff --git a/103120/examples/xml/request_config.xml b/103120/examples/xml/request_config.xml new file mode 100644 index 0000000000000000000000000000000000000000..69a98e1cdeec15964a4599bc36b71a5ea4b1be1f --- /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..bf99aa57af9bf10a742fcbc5e4c8ebb4a2367220 --- /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_Core.schema.json b/103120/schema/json/ts_103120_Core.schema.json index 63e2ad484c3ae7f709be33f17c0a23ec4a2872c8..11ca5f523d8b79634900effb6752ed7e5251aa06 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": { + "GETCSPCONFIG": { + "$ref": "#/$defs/GETCSPCONFIGRequest" + } + }, + "required": [ + "GETCSPCONFIG" + ] } ] } @@ -339,6 +351,17 @@ "required": [ "DELIVERResponse" ] + }, + { + "type": "object", + "properties": { + "GETCSPCONFIGResponse": { + "$ref": "#/$defs/GETCSPCONFIGResponse" + } + }, + "required": [ + "GETCSPCONFIGResponse" + ] } ] } @@ -514,6 +537,28 @@ "Identifier" ] }, + "GETCSPCONFIGRequest": { + "type": "object", + "properties": {}, + "required": [] + }, + "GETCSPCONFIGResponse": { + "type": "object", + "properties": { + "LastChanged": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "Dictionaries": {}, + "TargetFormatTypeDefinitions": {}, + "TargetingConfigurations": {}, + "SupportedLIWorkflowEndpoints": {}, + "SupportedLPWorkflowEndpoints": {} + }, + "required": [ + "LastChanged", + "TargetingConfigurations" + ] + }, "HI1Object": { "type": "object", "properties": { @@ -603,4 +648,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..fc2ad0c0a85c41ff5bea5ef313c1a2120efe1d10 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" @@ -113,6 +116,9 @@ }, "task:ServiceType": { "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "task:TargetIdentifierSubtype": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" } }, "required": [] @@ -372,7 +378,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" @@ -470,6 +478,9 @@ }, "task:Subtype": { "$ref": "#/$defs/RequestSubtype" + }, + "task:TargetIdentifierSubtype": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" } }, "required": [] @@ -604,7 +615,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 +733,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..4e752e98082cec330220ce182f74ec6c3772093c --- /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..76cfe1dbdef94708eba7888e4b0787fb4dac8190 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/103120/schema/xsd/ts_103120_Task.xsd b/103120/schema/xsd/ts_103120_Task.xsd index 59f45d04b29e739ab8f4753ca656e273e076c709..59343ea78b3455ffa7a856cf41fc46268d9572d6 100644 --- a/103120/schema/xsd/ts_103120_Task.xsd +++ b/103120/schema/xsd/ts_103120_Task.xsd @@ -38,6 +38,7 @@ + @@ -136,6 +137,7 @@ + diff --git a/103221-1/TS_103_221_01.xsd b/103221-1/TS_103_221_01.xsd index cfcc6908baf0680385875be0f165dd7923e75811..a484ba7d7007b5ada1a14b09a99cf2cd1987fc78 100644 --- a/103221-1/TS_103_221_01.xsd +++ b/103221-1/TS_103_221_01.xsd @@ -1,5 +1,5 @@ - + diff --git a/103280/TS_103_280.schema.json b/103280/TS_103_280.schema.json index a6cca0c8e5af008e2ec6a4a572ec45b2f38f4e77..aa63f8183191f19ae988167b37237d9a34ca1a3f 100644 --- a/103280/TS_103_280.schema.json +++ b/103280/TS_103_280.schema.json @@ -1,5 +1,6 @@ { "$id": "ts_103280_2017_07", + "$schema": "https://json-schema.org/draft/2020-12/schema", "$defs": { "ShortString": { "type": "string", @@ -203,6 +204,16 @@ "ServiceAccessIdentifier": { "type": "string" }, + "EUICCID": { + "type": "string", + "pattern": "^[0-9]{32}$" + }, + "APN": { + "$ref": "#/$defs/LongString" + }, + "DNN": { + "$ref": "#/$defs/LongString" + }, "IPAddress": { "oneOf": [ { diff --git a/103280/TS_103_280.xsd b/103280/TS_103_280.xsd index cdbafba15e631772c32221f2826f81dfd185ad17..ef73723916b7d5abf8e2bc539a51766f0af70414 100644 --- a/103280/TS_103_280.xsd +++ b/103280/TS_103_280.xsd @@ -1,5 +1,5 @@ - + @@ -286,4 +286,15 @@ + + + + + + + + + + + diff --git a/103705/config.json b/103705/config.json new file mode 100644 index 0000000000000000000000000000000000000000..6d4bac9703d396adc0b9d8c421bfa314d370e169 --- /dev/null +++ b/103705/config.json @@ -0,0 +1,58 @@ +[{ + "coreSchema" : "schema/response.schema.json", + "supportingSchemas" : [ + "../103280/TS_103_280.schema.json", + "examples/example1/csp_records.schema.json", + "schema/etsi_types.schema.json" + ], + "exampleFiles" : [ + "examples/example1/csp_results.json" + ] +}, +{ + "coreSchema" : "schema/response.schema.json", + "supportingSchemas" : [ + "../103280/TS_103_280.schema.json", + "examples/example2/csp_records.schema.json", + "examples/example2/csp_types.schema.json", + "schema/etsi_types.schema.json" + ], + "exampleFiles" : [ + "examples/example2/csp_results.json" + ] +}, +{ + "coreSchema" : "schema/response.schema.json", + "supportingSchemas" : [ + "../103280/TS_103_280.schema.json", + "examples/example3/csp_records.schema.json", + "examples/example3/csp_types.schema.json", + "schema/etsi_types.schema.json" + ], + "exampleFiles" : [ + "examples/example3/csp_results.json" + ] +}, +{ + "coreSchema" : "schema/response.schema.json", + "supportingSchemas" : [ + "../103280/TS_103_280.schema.json", + "examples/example4/csp_records.schema.json", + "examples/example4/csp_types.schema.json", + "schema/etsi_types.schema.json" + ], + "exampleFiles" : [ + "examples/example4/csp_results.json" + ] +}, +{ + "coreSchema" : "schema/response.schema.json", + "supportingSchemas" : [ + "../103280/TS_103_280.schema.json", + "examples/example5/csp_records.schema.json", + "schema/etsi_types.schema.json" + ], + "exampleFiles" : [ + "examples/example5/csp_results.json" + ] +}] \ No newline at end of file diff --git a/103705/examples/example1/csp_records.schema.json b/103705/examples/example1/csp_records.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..344b4e39147a078eff78a10c72d521cd3680b01b --- /dev/null +++ b/103705/examples/example1/csp_records.schema.json @@ -0,0 +1,25 @@ +{ + "$id": "urn:etsi:li:103705:record-schema-id:v1.1.1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CSP Record Schema", + "description": "Defines the valid set of Records that may appear in a RecordSet (see ETSI TS 103 705 clause 6.2.4)", + "cspSchemaID" : "csp.example_1", + "cspName" : "csp.example.com", + "dateIssued" : "2024-04-024T09:00:01Z", + "version" : "1.1.1", + "$defs": { + "record" : { + "oneOf" : [{ + "allOf" : [ + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord"}}} + ]}, + { + "allOf" : [ + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/MessagingRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/MessagingRecord"}}} + ]} + ] + } + } +} \ No newline at end of file diff --git a/103705/examples/example1/csp_results.json b/103705/examples/example1/csp_results.json new file mode 100644 index 0000000000000000000000000000000000000000..52dbe6fa744b1061b2c61b9d72bfbdf5bdde4f31 --- /dev/null +++ b/103705/examples/example1/csp_results.json @@ -0,0 +1,47 @@ +{ + "recordSetDescription": { + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1.1.1", + "etsiSpecificationVersion": "0.3.0", + "cspName" : "csp.example.com", + "cspSchemaId" : "csp.example_1", + "cspSchemaVersion" : "1.0.0", + "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", + "requestReference": "LDID", + "created": "2024-04-25T09:31:56.000000Z" + }, + "recordSet": [ + { + "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", + "type": "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord", + "timeBegin": "2024-04-20T10:04:00.000000Z", + "timeEnd": "2024-04-20T10:05:00.000000Z", + "endReason": 16, + "parties": [ + { + "identity": {"phoneNumber": "491713920067"}, + "role": "originating", + "initialAccessTechnology" : "5G" + }, + { + "identity": {"phoneNumber": "441632960123"}, + "role": "terminating" + } + ] + }, + { + "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", + "type": "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/MessagingRecord", + "eventTime": "2024-04-18T10:04:00.000000Z", + "parties": [ + { + "identity": {"phoneNumber": "441632960123"}, + "role": "sender" + }, + { + "identity": {"phoneNumber": "491713920067"}, + "role": "receiver" + } + ] + } + ] +} \ No newline at end of file diff --git a/103705/examples/example1/description.txt b/103705/examples/example1/description.txt new file mode 100644 index 0000000000000000000000000000000000000000..1e567ac986b6950a401c97ec01708e9741c57c9a --- /dev/null +++ b/103705/examples/example1/description.txt @@ -0,0 +1,6 @@ +CSP elects to use only ETSI-standard types in their responses + +CSP imports the following types in their CSP record schema + +- InformationCall +- InformationMessaging diff --git a/103705/examples/example2/csp_records.schema.json b/103705/examples/example2/csp_records.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..e5082c754250db03968366e6d0980c3575173819 --- /dev/null +++ b/103705/examples/example2/csp_records.schema.json @@ -0,0 +1,25 @@ +{ + "$id": "urn:etsi:li:103705:record-schema-id:v1.1.1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CSP Record Schema", + "description": "Defines the valid set of Records that may appear in a RecordSet (see ETSI TS 103 705 clause 6.2.4)", + "cspSchemaID" : "csp.example_2", + "cspName" : "csp.example.com", + "dateIssued" : "2024-04-024T09:00:01Z", + "version" : "1.1.1", + "$defs": { + "record" : { + "oneOf" : [{ + "allOf" : [ + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord"}}} + ]}, + { + "allOf" : [ + { "$ref" : "csp_example_types#/$defs/CSPMessagingRecord" }, + { "properties" : { "type" : { "const" : "csp_example_types#/$defs/CSPMessagingRecord"}}} + ]} + ] + } + } +} \ No newline at end of file diff --git a/103705/examples/example2/csp_results.json b/103705/examples/example2/csp_results.json new file mode 100644 index 0000000000000000000000000000000000000000..c4ff7c003080f2e33b344c7fb3d6d20e486a6c5f --- /dev/null +++ b/103705/examples/example2/csp_results.json @@ -0,0 +1,47 @@ +{ + "recordSetDescription": { + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1.1.1", + "etsiSpecificationVersion": "0.3.0", + "cspName" : "csp.example.com", + "cspSchemaId" : "csp.example_2", + "cspSchemaVersion" : "1.0.0", + "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", + "requestReference": "LDID", + "created": "2024-04-25T09:31:56.000000Z" + }, + "recordSet": [ + { + "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", + "type": "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord", + "timeBegin": "2024-04-20T10:04:00.000000Z", + "timeEnd": "2024-04-20T10:05:00.000000Z", + "endReason": 16, + "parties": [ + { + "identity": {"phoneNumber": "491713920067"}, + "role": "originating" + }, + { + "identity": {"phoneNumber": "441632960123"}, + "role": "terminating" + } + ] + }, + { + "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", + "type": "csp_example_types#/$defs/CSPMessagingRecord", + "eventTime": "2024-04-18T10:04:00.000000Z", + "parties": [ + { + "identity": {"phoneNumber": "441632960123"}, + "role": "sender" + }, + { + "identity": {"phoneNumber": "491713920067"}, + "role": "receiver" + } + ], + "CSPMessagingReference" : "0608972c-9080-4bb1-bc30-35b7cb731bbf" + } + ] +} \ No newline at end of file diff --git a/103705/examples/example2/csp_types.schema.json b/103705/examples/example2/csp_types.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..4cf437d4ab5b4de387e17e58df0996866abcceb5 --- /dev/null +++ b/103705/examples/example2/csp_types.schema.json @@ -0,0 +1,14 @@ +{ + "$id": "csp_example_types", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ETSI TS 103 705 Types schema", + "description": "JSON schema for ETSI-defined types (see clause 6.1 and Annex A)", + "$defs": { + "CSPMessagingRecord" : { + "allOf" : [{ "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/MessagingRecord"}], + "properties" : { + "CSPMessagingReference" : { "$ref" : "ts_103280_2017_07#/$defs/UUID"} + } + } + } +} \ No newline at end of file diff --git a/103705/examples/example2/description.txt b/103705/examples/example2/description.txt new file mode 100644 index 0000000000000000000000000000000000000000..1b22fdf05b1a63328e1239ab9b68cb6a79372ad7 --- /dev/null +++ b/103705/examples/example2/description.txt @@ -0,0 +1,8 @@ +CSP uses the standard ETSI InformationCall record. + +For messaging the CSP can use the ETSI standard messaging format, +but they can also always provide a unique CSP-specific UUID for every message event. +The CSP extends the ETSI standard Messaging record by adding a single field + +- InformationCall +- CSPInformationMessaging diff --git a/103705/examples/example3/csp_records.schema.json b/103705/examples/example3/csp_records.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..fca8fa5fdee56486697f186203b1da4eaaf4a95f --- /dev/null +++ b/103705/examples/example3/csp_records.schema.json @@ -0,0 +1,25 @@ +{ + "$id": "urn:etsi:li:103705:record-schema-id:v1.1.1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CSP Record Schema", + "description": "Defines the valid set of Records that may appear in a RecordSet (see ETSI TS 103 705 clause 6.2.4)", + "cspSchemaID" : "csp.example_3", + "cspName" : "csp.example.com", + "dateIssued" : "2024-04-024T09:00:01Z", + "version" : "1.1.1", + "$defs": { + "record" : { + "oneOf" : [{ + "allOf" : [ + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord"}}} + ]}, + { + "allOf" : [ + { "$ref" : "csp_example_types#/$defs/CSPServiceRecord" }, + { "properties" : { "type" : { "const" : "csp_example_types#/$defs/CSPServiceRecord"}}} + ]} + ] + } + } +} \ No newline at end of file diff --git a/103705/examples/example3/csp_results.json b/103705/examples/example3/csp_results.json new file mode 100644 index 0000000000000000000000000000000000000000..8f2f9edb52f81aec15eb2c3d37eeb1837c5cbca3 --- /dev/null +++ b/103705/examples/example3/csp_results.json @@ -0,0 +1,38 @@ +{ + "recordSetDescription": { + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1.1.1", + "etsiSpecificationVersion": "0.3.0", + "cspName" : "csp.example.com", + "cspSchemaId" : "csp.example_3", + "cspSchemaVersion" : "1.0.0", + "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", + "requestReference": "LDID", + "created": "2024-04-25T09:31:56.000000Z" + }, + "recordSet": [ + { + "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", + "type": "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord", + "timeBegin": "2024-04-20T10:04:00.000000Z", + "timeEnd": "2024-04-20T10:05:00.000000Z", + "endReason": 16, + "parties": [ + { + "identity": {"phoneNumber": "491713920067"}, + "role": "originating" + }, + { + "identity": {"phoneNumber": "441632960123"}, + "role": "terminating" + } + ] + }, + { + "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", + "type": "csp_example_types#/$defs/CSPServiceRecord", + "timeOfService": "2024-04-18T10:04:00.000000Z", + "numberOfService" : 7, + "serviceEnum" : "Foo" + } + ] +} \ No newline at end of file diff --git a/103705/examples/example3/csp_types.schema.json b/103705/examples/example3/csp_types.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..fde0bf8c21b806d885bb9f77c28445a50cd080e3 --- /dev/null +++ b/103705/examples/example3/csp_types.schema.json @@ -0,0 +1,38 @@ +{ + "$id": "csp_example_types", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ETSI TS 103 705 Types schema", + "description": "JSON schema for ETSI-defined types (see clause 6.1 and Annex A)", + "$defs": { + "CSPServiceRecord" : { + "type" : "object", + "title" : "CSP Service Record", + "description" : "Information about some new fictional service that this CSP provides", + "properties" : { + "timeOfService" : { + "description" : "Time at which something happened (using an ETSI TS 103 280 type)", + "$ref" : "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime" + }, + "dataVolumeUsed" : { + "description" : "A data volume associated with this service record (using an ETSI TS 103 705 type) ", + "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/DataVolume" + }, + "numberOfService" : { + "description" : "Some number associated with this service record (using a native JSON type)", + "type" : "integer" + }, + "serviceEnum" : { + "description" : "A field using a type defined elsewhere in this schema", + "$ref" : "#/$defs/CSPDefinedEnum" + } + } + }, + "CSPDefinedEnum" : { + "enum" : [ + "Foo", + "Bar", + "Baz" + ] + } + } +} \ No newline at end of file diff --git a/103705/examples/example3/description.txt b/103705/examples/example3/description.txt new file mode 100644 index 0000000000000000000000000000000000000000..a72d3ca455d41b46e806583614cd6d4233f6feb7 --- /dev/null +++ b/103705/examples/example3/description.txt @@ -0,0 +1,8 @@ +CSP uses the standard ETSI InformationCall record. + +The CSP has some novel service which is not well described by any of the standard +ETSI records; the CSP defines a completely new record, but can still re-use components +from TS 103 705 and TS 103 280. + +- InformationCall +- CSPServiceRecord diff --git a/103705/examples/example4/csp_records.schema.json b/103705/examples/example4/csp_records.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..a17867055747a328e128fa6093540d0529cd3ba6 --- /dev/null +++ b/103705/examples/example4/csp_records.schema.json @@ -0,0 +1,24 @@ +{ + "$id": "urn:etsi:li:103705:record-schema-id:v1.1.1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CSP Record Schema", + "description": "Defines the valid set of Records that may appear in a RecordSet (see ETSI TS 103 705 clause 6.2.4)", + "cspSchemaID" : "csp.example_4", + "cspName" : "csp.example.com", + "dateIssued" : "2024-04-024T09:00:01Z", + "version" : "1.1.1", + "$defs": { + "record" : { + "oneOf" : [{ + "allOf" : [ + { "$ref" : "csp_example_types#/$defs/CSPSubscriberRecord" }, + { "properties" : { "type" : { "const" : "csp_example_types#/$defs/CSPSubscriberRecord"}}} + ]},{ + "allOf" : [ + { "$ref" : "csp_example_types#/$defs/CSPAddressRecord" }, + { "properties" : { "type" : { "const" : "csp_example_types#/$defs/CSPAddressRecord"}}} + ]} + ] + } + } +} \ No newline at end of file diff --git a/103705/examples/example4/csp_results.json b/103705/examples/example4/csp_results.json new file mode 100644 index 0000000000000000000000000000000000000000..fd290b155bc18ab7a33f9e1a2a32160e2ea2ceb3 --- /dev/null +++ b/103705/examples/example4/csp_results.json @@ -0,0 +1,31 @@ +{ + "recordSetDescription": { + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1.1.1", + "etsiSpecificationVersion": "0.3.0", + "cspName" : "csp.example.com", + "cspSchemaId" : "csp.example_4", + "cspSchemaVersion" : "1.0.0", + "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", + "requestReference": "LDID", + "created": "2024-04-25T09:31:56.000000Z" + }, + "recordSet": [ + { + "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", + "type": "csp_example_types#/$defs/CSPSubscriberRecord", + "subscriberName" : "Max Mustermann", + "registeredAddress" : { "destination" : "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0" }, + "deliveryAddress" : { "destination" : "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0" }, + "billingAddress" : { "destination" : "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0" }, + "contactAddress" : { "destination" : "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0" } + }, + { + "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", + "type": "csp_example_types#/$defs/CSPAddressRecord", + "line1" : "First Line Of Address", + "line2" : "Secoond Line Of Address", + "postalCode" : "postal code", + "country" : "country code" + } + ] +} \ No newline at end of file diff --git a/103705/examples/example4/csp_types.schema.json b/103705/examples/example4/csp_types.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..8fee961b7654929e0f25df7277a02cf26bc00c41 --- /dev/null +++ b/103705/examples/example4/csp_types.schema.json @@ -0,0 +1,46 @@ +{ + "$id": "csp_example_types", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ETSI TS 103 705 Types schema", + "description": "JSON schema for ETSI-defined types (see clause 6.1 and Annex A)", + "$defs": { + "CSPSubscriberRecord" : { + "type" : "object", + "title" : "CSP Subscriber Record", + "description" : "A CSP's subscriber record. May contain four different addresses, which are often set to the same value", + "properties" : { + "subscriberName" : { + "description" : "Name of subscriber (obviously a real definition would be more complex", + "type" : "string" + }, + "registeredAddress" : { + "description" : "Points to the address registered as part of the service", + "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/Pointer" + }, + "deliveryAddress" : { + "description" : "Points to the address used for delivery", + "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/Pointer" + }, + "billingAddress" : { + "description" : "Points to the address used for billing", + "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/Pointer" + }, + "contactAddress" : { + "description" : "Points to the address used for mailing purposes", + "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/Pointer" + } + } + }, + "CSPAddressRecord" : { + "type" : "object", + "title" : "CSP Address Record", + "description" : "A simple address structure (for example purporses - a standard ETSI one is needed, FFS)", + "properties" : { + "line1" : { "type" : "string"}, + "line2" : { "type" : "string"}, + "postalCode" : { "type" : "string"}, + "country" : { "type" : "string"} + } + } + } +} \ No newline at end of file diff --git a/103705/examples/example4/description.txt b/103705/examples/example4/description.txt new file mode 100644 index 0000000000000000000000000000000000000000..ae4259c054a33d5a54a496edef30d3d0c6916e00 --- /dev/null +++ b/103705/examples/example4/description.txt @@ -0,0 +1,12 @@ +CSP wants to create a simple subsciber record structure +(side note - at the moment we don't have that in the standard schema, but it is likely to come later) +The subscriber can have a number of different addresses (e.g. contact, billing, delivery, installed) +but they are often all set to the same value. To reduce the amount of repetition, +the CSP uses the Pointer record + +- CSPSubscriberRecord +- CSPAddressRecord + + +Number for reply LS? from 40408 5GSAT_Ph3_Arch +477 \ No newline at end of file diff --git a/103705/examples/example5/csp_records.schema.json b/103705/examples/example5/csp_records.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..0e8ffaf20f665a2b51a72d610dc672d35ff98313 --- /dev/null +++ b/103705/examples/example5/csp_records.schema.json @@ -0,0 +1,25 @@ +{ + "$id": "urn:etsi:li:103705:record-schema-id:v1.1.1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CSP Record Schema", + "description": "Defines the valid set of Records that may appear in a RecordSet (see ETSI TS 103 705 clause 6.2.4)", + "cspSchemaID" : "csp.example_5", + "cspName" : "csp.example.com", + "dateIssued" : "2024-06-20 09:42:37", + "version" : "1.1.1", + "$defs": { + "record" : { + "oneOf" : [{ + "allOf" : [ + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord"}}} + ]}, + { + "allOf" : [ + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/MessagingRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/MessagingRecord"}}} + ]} + ] + } + } +} \ No newline at end of file diff --git a/103705/examples/example5/csp_results.json b/103705/examples/example5/csp_results.json new file mode 100644 index 0000000000000000000000000000000000000000..f8c81d9aaa76e0281bef317fca2cd437475e4292 --- /dev/null +++ b/103705/examples/example5/csp_results.json @@ -0,0 +1 @@ +{"recordSetDescription": {"etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1.1.1", "etsiSpecificationVersion": "0.3.0", "cspName" : "csp.example.com", "cspSchemaId": "csp.example_1", "cspSchemaVersion": "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "requestReference": "LDID", "created": "2024-04-25T09:31:56.000000Z"}, "recordSet": [{"id": "3da91ade-f526-4e55-b5da-0c8178f25c24", "type": "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, "parties": [{"identity": {"phoneNumber": "491713920067"}, "role": "originating"}, {"identity": {"phoneNumber": "441632960123"}, "role": "terminating"}]}, {"id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", "type": "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/MessagingRecord", "eventTime": "2024-04-18T10:04:00.000000Z", "parties": [{"identity": {"phoneNumber": "441632960123"}, "role": "sender"}, {"identity": {"phoneNumber": "491713920067"}, "role": "receiver"}]}], "Signature": {"protected": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9", "signature": "yvPyjRDAS7dSld9inyVfLpz02En47_AMq0J8cP82BCU"}} diff --git a/103705/examples/example5/description.txt b/103705/examples/example5/description.txt new file mode 100644 index 0000000000000000000000000000000000000000..9e8da6beced9b152914550e48dd1c56c38e5d925 --- /dev/null +++ b/103705/examples/example5/description.txt @@ -0,0 +1,6 @@ +CSP elects to use only ETSI-standard types in their responses, but includes a signature + +CSP imports the following types in their CSP record schema + +- InformationCall +- InformationMessaging diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..1854183d6941dd2888dd27a9f88cad1a8197b0c9 --- /dev/null +++ b/103705/schema/etsi_types.schema.json @@ -0,0 +1,411 @@ +{ + "$id": "urn:etsi:li:103705:type-schema-id:v1.1.1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ETSI TS 103 705 Types schema", + "description": "JSON schema for ETSI-defined types (see clause 6.1 and Annex A)", + "$defs": { + "Pointer": { + "type": "object", + "title": "Pointer", + "description": "Allows one Record in a RecordSet to point to data in another Record in the same Recordset. See clause 5.4 and Annex A.2.2", + "properties": { + "destination": { + "type": "string", + "title": "Pointer Destination", + "description": "Identifies the Record in the RecordSet containined the referred-to data (see clause 5.3.2 and A.2.2)" + }, + "relationship": { + "type": "string", + "title": "Relationship", + "description": "Indicates the nature of the relationship. Valid values and their meaning should be provided by the CSP" + } + }, + "required": [ + "destination" + ] + }, + "CallRecord": { + "type": "object", + "title": "Information about call details", + "description": "Details about a record or event related to a call", + "required": [ + "timeBegin", "parties" + ], + "properties": { + "sessionRefId": { + "type": "string", + "description": "A reference identifier to uniquely identify the telephony call" + }, + "timeBegin": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Time at which the call began" + }, + "timeEnd": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Time at which the call ended" + }, + "callDuration": { + "type": "integer", + "description": "Chargeable duration of the call in seconds" + }, + "ringingDuration": { + "type": "integer", + "description": "Non-chargeable duration of the call in seconds" + }, + "parties": { + "type": "array", + "items": { + "$ref": "#/$defs/CallPartyInformation" + } + }, + "endReason": { + "type": "integer", + "description": "ITU Q.850" + } + } + }, + "MessagingRecord": { + "type": "object", + "title": "Information about messaging details", + "description": "Details about a record or event related to a message", + "required": [ + "eventTime", "parties" + ], + "properties": { + "sessionRefId": { + "type": "string", + "description": "A reference identifier to uniquely identify the message" + }, + "eventTime": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Time at which the event happened" + }, + "parties": { + "type": "array", + "items": { + "$ref": "#/$defs/MessagingPartyInformation" + } + } + } + }, + "EmailRecord": { + "type": "object", + "title": "Information about email details", + "description": "Details about a record or event related to an email", + "required": [ + "eventTime", "parties" + ], + "properties": { + "sessionRefId": { + "type": "string", + "description": "A reference identifier to uniquely identify the message" + }, + "eventTime": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Time at which the event happened" + }, + "parties": { + "type": "array", + "items": { + "$ref": "#/$defs/EmailPartyInformation" + } + } + } + }, + "DataAccessRecord": { + "type": "object", + "title": "Data Record", + "description": "Information about a data access session (e.g. a mobile data session)", + "required": [ + "timeBegin", "parties" + ], + "properties": { + "sessionRefId": { + "type": "string", + "description": "A reference identifier to uniquely identify the message" + }, + "timeBegin": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Time at which the data access session began" + }, + "timeEnd": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Time at which the data access session ended" + }, + "parties": { + "type": "array", + "items": { + "$ref": "#/$defs/DataAccessPartyInformation" + } + }, + "volume": { + "$ref": "#/$defs/DataVolume" + } + } + }, + "CallPartyInformation": { + "type": "object", + "description" : "Information about the participants and technologies related to the call", + "properties": { + "identity": { + "$ref": "#/$defs/CallPartyId" + }, + "role": { + "enum": [ + "originating", + "terminating", + "forwarding", + "unknown" + ] + }, + "initialAccessTechnology": { + "$ref": "#/$defs/AccessTechnology", + "description": "Access technology used at the start of the call" + }, + "locations": { + "type": "array", + "items": { + "$ref": "#/$defs/Location" + } + } + } + }, + "MessagingPartyInformation": { + "type": "object", + "description": "Information about the participants and technologies related to the messages", + "properties": { + "identity": { + "$ref": "#/$defs/MessagingPartyId" + }, + "role": { + "enum": [ + "sender", + "receiver" + ] + }, + "accessTechnology": { + "$ref": "#/$defs/AccessTechnology", + "description": "Access technology used" + }, + "locations": { + "type": "array", + "items": { + "$ref": "#/$defs/Location" + } + } + } + }, + "EmailPartyInformation": { + "type": "object", + "description": "Information about the participants and technologies related to the messages", + "properties": { + "identity": { + "$ref": "#/$defs/EmailPartyId" + }, + "role": { + "enum": [ + "sender", + "receiver" + ] + }, + "accessTechnology": { + "$ref": "#/$defs/AccessTechnology", + "description": "Access technology used" + }, + "locations": { + "type": "array", + "items": { + "$ref": "#/$defs/Location" + } + } + } + }, + "DataAccessPartyInformation": { + "type": "object", + "description": "Information about the participants and technologies related to the data service", + "properties": { + "identity": { + "$ref": "#/$defs/DataAccessPartyId" + }, + "aPNDNN": { + "description" : "APN or DNN associated with the data access", + "$ref": "ts_103280_2017_07#/$defs/DNN" + }, + "initialAccessTechnology": { + "$ref": "#/$defs/AccessTechnology", + "description": "Access technology used at the start of the data access session" + }, + "locations": { + "type": "array", + "items": { + "$ref": "#/$defs/Location" + } + } + } + }, + "CallPartyId": { + "type": "object", + "description": "Identifier of the party related to the call", + "properties": { + "phoneNumber": { + "$ref": "ts_103280_2017_07#/$defs/InternationalE164" + }, + "iMSI": { + "$ref": "ts_103280_2017_07#/$defs/IMSI" + }, + "iMEI": { + "$ref": "ts_103280_2017_07#/$defs/IMEI" + }, + "sIPURI": { + "$ref": "ts_103280_2017_07#/$defs/SIPURI" + }, + "tELURI": { + "$ref": "ts_103280_2017_07#/$defs/TELURI" + }, + "unstructuredPhoneNumber": { + "type": "string" + } + } + }, + "MessagingPartyId": { + "type": "object", + "description": "Identifier of the party related to the message", + "properties": { + "phoneNumber": { + "$ref": "ts_103280_2017_07#/$defs/InternationalE164" + }, + "iMSI": { + "$ref": "ts_103280_2017_07#/$defs/IMSI" + }, + "iMEI": { + "$ref": "ts_103280_2017_07#/$defs/IMEI" + }, + "sIPURI": { + "$ref": "ts_103280_2017_07#/$defs/SIPURI" + }, + "tELURI": { + "$ref": "ts_103280_2017_07#/$defs/TELURI" + }, + "unstructuredPhoneNumber": { + "type": "string" + } + } + }, + "EmailPartyId": { + "type": "object", + "description": "Identifier of the party related to the message", + "properties": { + "emailAddress": { + "$ref": "ts_103280_2017_07#/$defs/EmailAddress" + }, + "iPv4Address": { + "$ref": "ts_103280_2017_07#/$defs/IPv4Address" + }, + "iPv6Address": { + "$ref": "ts_103280_2017_07#/$defs/IPv6Address" + } + } + }, + "DataAccessPartyId": { + "type": "object", + "description": "Identifier of the party related to the data service", + "properties": { + "phoneNumber": { + "$ref": "ts_103280_2017_07#/$defs/InternationalE164" + }, + "iMSI": { + "$ref": "ts_103280_2017_07#/$defs/IMSI" + }, + "iMEI": { + "$ref": "ts_103280_2017_07#/$defs/IMEI" + }, + "sUPIIMSI": { + "$ref": "ts_103280_2017_07#/$defs/SUPIIMSI" + }, + "sUPINAI": { + "$ref": "ts_103280_2017_07#/$defs/SUPINAI" + }, + "sUCI": { + "$ref": "ts_103280_2017_07#/$defs/SUCI" + }, + "pEIIMEI": { + "$ref": "ts_103280_2017_07#/$defs/PEIIMEI" + }, + "iPv4Address": { + "$ref": "ts_103280_2017_07#/$defs/IPv4Address" + }, + "iPv4CIDR": { + "$ref": "ts_103280_2017_07#/$defs/IPv4CIDR" + }, + "iPv6Address": { + "$ref": "ts_103280_2017_07#/$defs/IPv6Address" + }, + "iPv6CIDR": { + "$ref": "ts_103280_2017_07#/$defs/IPv6CIDR" + }, + "mACAddress": { + "$ref": "ts_103280_2017_07#/$defs/MACAddress" + }, + "unstructuredPhoneNumber": { + "type": "string" + } + } + }, + "DataVolume": { + "type": "object", + "description": "quantification of the bytes exchanged", + "properties": { + "bytesUpload": { + "type": "integer" + }, + "bytesDownload": { + "type": "integer" + }, + "bytesTotal": { + "type": "integer" + } + } + }, + "AccessTechnology": { + "description": "Access technology used", + "enum": [ + "2G", + "3G", + "4G", + "5G", + "fiber", + "cable", + "wifi", + "xDSL", + "pstn" + ] + }, + "Location": { + "type": "object", + "description": "Location information", + "properties": { + "cGI": { + "$ref": "ts_103280_2017_07#/$defs/CGI" + }, + "eCGI": { + "$ref": "ts_103280_2017_07#/$defs/ECGI" + }, + "nCGI": { + "$ref": "ts_103280_2017_07#/$defs/NCGI" + }, + "modemMAC": { + "$ref": "ts_103280_2017_07#/$defs/MACAddress" + }, + "coord": { + "$ref": "ts_103280_2017_07#/$defs/WGS84CoordinateDecimal" + }, + "coordPolygon": { + "type": "array", + "items": { + "$ref": "ts_103280_2017_07#/$defs/WGS84CoordinateDecimal" + } + } + } + } + } +} diff --git a/103705/schema/records.schema.json b/103705/schema/records.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..ab5970117df471170162867931cda99cffad9e03 --- /dev/null +++ b/103705/schema/records.schema.json @@ -0,0 +1,23 @@ +{ + "$id": "urn:etsi:li:103705:record-schema-id:v1.1.1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "CSP Record Schema", + "description": "Defines the valid set of Records that may appear in a RecordSet (see ETSI TS 103 705 clause 6.2.4)", + "cspName" : "{replace with assigned CSP name - see ETSI TS 103 705 Table 6.2.4-1", + "cspSchemaID" : "{replace with assigned ID - see ETSI TS 103 705 Table 6.2.4-1}", + "dateIssued" : "{replace with date issued - see ETSI TS 103 705 Table 6.2.4-1}", + "cspSchemaVersion" : "{Replace with version - see ETSI TS 103 705 Table 6.2.4-1}", + "$defs": { + "record" : { + "oneOf" : [ + { + "$comment" : "This is an example", + "allOf" : [ + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/CallRecord"}}} + ] + } + ] + } + } +} \ No newline at end of file diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..2d6f8a0e0d4507cda3d9a589c55c5e14addb2440 --- /dev/null +++ b/103705/schema/response.schema.json @@ -0,0 +1,129 @@ +{ + "$id": "urn:etsi:li:103705:response-schema-id:v1.1.1", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ETSI TS 103 705 Response", + "description": "Overall Response structure, representing the results of a lawful disclosure request (see clause 5)", + "type": "object", + "properties": { + "recordSetDescription": { + "$ref": "#/$defs/recordSetDescription" + }, + "recordSet": { + "$ref": "#/$defs/recordSet" + }, + "Signature": { + "$ref" : "#/$defs/Signature" + } + }, + "required": [ + "recordSetDescription", + "recordSet" + ], + "$defs": { + "recordSetDescription": { + "type": "object", + "title": "RecordSetDescription", + "description": "Provides metadata about the records being delivered (see clause 5.2)", + "properties": { + "etsiSchemaId": { + "description" : "ID of the ETSI JSON schema used by the Response (see clause 5.2.2)", + "$ref": "#/$defs/schemaId" + }, + "etsiSpecificationVersion": { + "description" : "Version of ETSI TS 103 705 used by the Response (see clause 5.2.3)", + "$ref": "#/$defs/version" + }, + "cspName" : { + "description" : "Identifies the CSP generating the Response (see clause 5.2.4)", + "$ref": "#/$defs/schemaId" + }, + "cspSchemaId" : { + "description" : "ID of CSP Record Schema used by the Response (see clause 5.2.5)", + "$ref": "#/$defs/schemaId" + }, + "cspSchemaVersion" : { + "description" : "Version number assigned by the CSP to the CSP Record Schema identified by the cspSchemaId (see clause 5.2.6)", + "$ref": "#/$defs/version" + }, + "resultSetId": { + "description" : "Unique identifier for this result set (see clause 5.2.7)", + "$ref": "#/$defs/resultSetId" + }, + "requestReference": { + "description" : "Reference to the original request (see clause 5.2.8)", + "$ref": "#/$defs/requestReference" + }, + "created": { + "description" : "Timestamp showing the creation time of the Response (see clause 5.2.9)", + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime" + } + }, + "required": [ + "etsiSchemaId", + "etsiSpecificationVersion", + "cspName", + "cspSchemaId", + "cspSchemaVersion", + "resultSetId", + "requestReference", + "created" + ] + }, + "schemaId": { + "type": "string" + }, + "version": { + "type" : "string", + "pattern" : "^[0-9]+\\.[0-9]+\\.[0-9]+$" + }, + "resultSetId": { + "type": "string" + }, + "requestReference": { + "type": "string" + }, + "recordSet": { + "type": "array", + "title": "RecordSet", + "description": "RecordSet (see clause 5.3). Contains a set of Records.", + "items": { + "$ref": "#/$defs/record" + } + }, + "record": { + "allOf" : [{ "$ref" : "urn:etsi:li:103705:record-schema-id:v1.1.1#/$defs/record"}], + "type": "object", + "title": "Record", + "description": "Response record (see clause 5.3)", + "properties": { + "id": { + "title": "id", + "description": "Unique identifier for the Record within the RecordSet (see clause 5.3.2).", + "type": "string" + }, + "type": { + "title": "type", + "description": "A JSON Pointer to the schema definition that defines the type (see clause 5.3.3)" + } + }, + "required": [ + "id", + "type" + ] + }, + "Signature": { + "properties": { + "protected": { + "type": "string" + }, + "signature": { + "type": "string" + } + }, + "required": [ + "protected", + "signature" + ] + } + } +} diff --git a/103705/validate.py b/103705/validate.py new file mode 100644 index 0000000000000000000000000000000000000000..fa5490974ca2b5e4c1dea110df7a5d6de24c0a72 --- /dev/null +++ b/103705/validate.py @@ -0,0 +1,95 @@ +import sys +from jsonschema import validate, RefResolver, Draft202012Validator +import json +from pathlib import Path +import logging +import argparse + + + +# filename = sys.argv[1] + +# def load_json (path): +# with open(path) as f: +# s = json.load(f) +# return s + +# schema_store = {} + +# json_instance = load_json(filename) +# print (json_instance) + +# etsi_schema = load_json('response.schema.json') +# ext_schema = load_json('extended.schema.json') +# ext_ent_schema = load_json("extended_entities.schema.json") +# schema_store = { +# etsi_schema['$id'] : etsi_schema, +# ext_schema['$id'] : ext_schema, +# ext_ent_schema['$id'] : ext_ent_schema +# } + +# resolver = RefResolver(None, referrer=None, store=schema_store) + +# print (etsi_schema) + +# v = Draft202012Validator(ext_schema, resolver=resolver) +# v.validate(json_instance) + +# validate(json_instance, ext_schema) +# print ("OK") + +def handle_uri(u): + print(u) + +def load_json(path : str): + with open(path) as f: + return json.load(f) + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + + parser.add_argument('-s','--schemadir', action="append", help="Directory containing supporting schema files to use for validation") + parser.add_argument('-v', '--verbose', action="count", help="Verbose logging (can be specified multiple times)") + parser.add_argument('-i', '--input', type=argparse.FileType('r'), default=sys.stdin, help="Path to input file (if absent, stdin is used)") + parser.add_argument('schema', help="Primary schema to validate against") + + args = parser.parse_args() + + match args.verbose: + case v if v and v >= 2: + logging.basicConfig(level=logging.DEBUG) + case 1: + logging.basicConfig(level=logging.INFO) + case _: + logging.basicConfig(level=logging.WARNING) + + logging.debug(f"Arguments: {args}") + + instance_doc = json.loads(args.input.read()) + args.input.close() + main_schema = load_json(args.schema) + schema_dict = { main_schema['$id'] : main_schema } + + if args.schemadir: + schema_paths = [] + for d in args.schemadir: + schema_paths += [f for f in Path(d).rglob("*.schema.json")] + logging.info(f"Schema files loaded: {schema_paths}") + + schemas_json = [json.load(p.open()) for p in schema_paths] + schema_dict = schema_dict | { s['$id'] : s for s in schemas_json } + + logging.info(f"Schema IDs loaded: {[k for k in schema_dict.keys()]}") + + logging.debug (f"Instance doc: {instance_doc}") + logging.debug (f"Main schema: {main_schema}") + + resolver = RefResolver(None, + referrer=None, + store=schema_dict) + + v = Draft202012Validator(main_schema, resolver=resolver) + + v.validate(instance_doc) + + logging.info("Done") \ No newline at end of file diff --git a/103705/validation/validate_705.py b/103705/validation/validate_705.py new file mode 100644 index 0000000000000000000000000000000000000000..bb6913d2a2e5ce032b1b0f6ce39413cef1b5036e --- /dev/null +++ b/103705/validation/validate_705.py @@ -0,0 +1,97 @@ +import sys +from jsonschema import validate, RefResolver, Draft202012Validator +import json +from pathlib import Path +import logging +import argparse + +def handle_uri(u): + print(u) + +def load_json(path : str): + with open(path) as f: + return json.load(f) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + + parser.add_argument('-s','--schemadir', action="append", help="Directory containing supporting schema files to use for validation") + parser.add_argument('-v', '--verbose', action="count", help="Verbose logging (can be specified multiple times)") + parser.add_argument('-i', '--input', type=argparse.FileType('r'), default=sys.stdin, help="Path to input file (if absent, stdin is used)") + + args = parser.parse_args() + + match args.verbose: + case v if v and v >= 2: + logging.basicConfig(level=logging.DEBUG) + case 1: + logging.basicConfig(level=logging.INFO) + case _: + logging.basicConfig(level=logging.WARNING) + + logging.debug(f"Arguments: {args}") + + instance_doc = json.loads(args.input.read()) + args.input.close() + + config = { + 'schema_include_dirs' : [ + '../schema/', + '../../103280/', + ], + 'main_schema_doc' : '../schema/response.schema.json' + } + + rootPath = Path(sys.argv[0]).parent + main_schema = load_json(str(rootPath / config['main_schema_doc'])) + schema_dict = { main_schema['$id'] : main_schema } + + schema_paths = [] + for d in config['schema_include_dirs']: + schema_paths += [f for f in (rootPath / Path(d)).rglob("*.schema.json")] + logging.info(f"Core schema files loaded: {schema_paths}") + if args.schemadir: + for d in args.schemadir: + schema_paths += [f for f in Path(d).rglob("*.schema.json")] + logging.info(f"CSP schema files loaded: {schema_paths}") + else: + logging.info(f"No CSP schema files loaded") + schemas_json = [json.load(p.open()) for p in schema_paths] + schema_dict = schema_dict | { s['$id'] : s for s in schemas_json } + + logging.info(f"Schema IDs loaded: {[k for k in schema_dict.keys()]}") + + logging.debug (f"Instance doc: {instance_doc}") + logging.debug (f"Main schema: {main_schema}") + + resolver = RefResolver(None, + referrer=None, + store=schema_dict) + + logging.info("Performing ETSI validation") + v = Draft202012Validator(main_schema, resolver=resolver) + v.validate(instance_doc) + + logging.info("Building record type dictionary") + type_dict = instance_doc['recordSetDescription']['recordTypes'] + logging.debug(type_dict) + ref_dict = { k : {"$ref" : v} for k,v in type_dict.items()} + validator_dict = { k : Draft202012Validator(ref_dict[k], resolver=resolver) for k,v in ref_dict.items()} + logging.debug(ref_dict) + + logging.info("Validating records") + for r in instance_doc['recordSet']: + type_key = r['type'] + if type_key not in type_dict.keys(): + logging.error(f"Record {r['id']} has type {type_key}, not in recordType dict") + type_ref = type_dict[type_key] + type_schema_id = type_ref.split('#')[0] + logging.info(f"Using {type_schema_id} to validate {type_ref} in record {r['id']}") + if not (type_key in validator_dict.keys()): + logging.error(f'Type key {type_key} from type {type_ref} in record {r["id"]} not in validator dictionary') + print(ref_dict) + v = validator_dict[type_key] + v.validate(r) + + logging.info("Done") \ No newline at end of file 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/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/xml_to_json.py b/utils/xml_to_json.py index 7caebb6b9e195594c494dbc6fc1d512c2727be84..86f8ad7ec394603683a3ce6fccd7a4e16aad330d 100644 --- a/utils/xml_to_json.py +++ b/utils/xml_to_json.py @@ -66,19 +66,38 @@ 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 = [ 'ActionIdentifier', 'delivery:SequenceNumber', - 'task:Order' + 'task:Order', + 'ErrorCode', + 'Generation', ] coerce_to_bool = [ 'delivery:LastSequence' ] +coerce_to_empty = [ + 'GETCSPCONFIG' +] + +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] @@ -89,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__":