From 77fc0026cd8c8207c5a57a9c2ee4bc1973993695 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 24 Apr 2024 10:24:14 +0100 Subject: [PATCH 01/41] Rebasing previous draft branch --- 103705/examples/csp_a.schema.json | 64 ++++++++++++++++++ 103705/examples/csp_a_results.json | 22 +++++++ 103705/generate_docs.py | 2 + 103705/schema/etsi_types.schema.json | 82 +++++++++++++++++++++++ 103705/schema/response.schema.json | 77 ++++++++++++++++++++++ 103705/validate.py | 95 +++++++++++++++++++++++++++ 103705/validation/validate_705.py | 97 ++++++++++++++++++++++++++++ 7 files changed, 439 insertions(+) create mode 100644 103705/examples/csp_a.schema.json create mode 100644 103705/examples/csp_a_results.json create mode 100644 103705/generate_docs.py create mode 100644 103705/schema/etsi_types.schema.json create mode 100644 103705/schema/response.schema.json create mode 100644 103705/validate.py create mode 100644 103705/validation/validate_705.py diff --git a/103705/examples/csp_a.schema.json b/103705/examples/csp_a.schema.json new file mode 100644 index 0000000..febb70a --- /dev/null +++ b/103705/examples/csp_a.schema.json @@ -0,0 +1,64 @@ +{ + "$id": "example.com_csp-a-schema_1.2.3", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "Example extended schema for CSP A. This CSP only ever has one person associated with a subscription - the account holder - and so composes a Subscription record from the ETSI-standard Subscription and PersonDetails entities", + "allOf": [ + { + "$ref": "http://etsi.org/temp/705" + }, + { + "type": "object", + "properties": { + "recordSet": { + "type": "array", + "items": { + "$ref": "#/$defs/definedRecords" + } + } + }, + "required": [ + "recordSet" + ] + } + ], + "$defs": { + "definedRecords": { + "title" : "Defined Records", + "description" : "Sets out what the valid set of Record types is for this CSP. It is expressed as a 'oneOf' list, each of which combines a type identifier and a reference to the type that is used to validate the record", + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "title" : "Subscriber record", + "description" : "Uses the ETSI-standard subscriber record (the first $ref), extended to include person details (the second $ref)", + "properties": { + "type": { + "const": "Subscription" + } + } + }, + { + "description" : "Uses the basic ETSI-standard subscriber record fields as a base", + "$ref": "http://etsi.org/temp/705/entities#/$defs/Subscription" + }, + { + "description" : "Extends the basic ETSI standard subscriber record according to the definition in extendedSubscriberRecord", + "$ref": "#/$defs/extendedSubscriberRecord" + } + ] + } + ] + }, + "extendedSubscriberRecord" : { + "title" : "Extended Subscriber Record", + "description" : "Here CSP A can describe all the extra fields that they want to put in their subscriber record. In this case, they just add the details of the account holder using the ETSI-standard PersonDetails type", + "properties" : { + "title" : "Account Holder", + "description" : "Name and date of birth of the account holder for the description", + "accountHolder" : { "$ref" : "http://etsi.org/temp/705/entities#/$defs/PersonDetails"} + }, + "required" : ["personDetails"] + } + } +} \ No newline at end of file diff --git a/103705/examples/csp_a_results.json b/103705/examples/csp_a_results.json new file mode 100644 index 0000000..e142485 --- /dev/null +++ b/103705/examples/csp_a_results.json @@ -0,0 +1,22 @@ +{ + "recordSetDescription" : { + "schemaId" : "etsi.org/ts_103_705/1.1.1", + "resultSetId" : "788e190d-fb2e-416e-9798-12a66ebe0a1a", + "queryReference" : "LDID_1", + "created" : "2023-06-08T09:31:56.000000Z", + "recordTypes" : { + "Subscription" : "example.com_csp-a-schema_1.2.3#$defs/extendedSubscriberRecord" + } + }, + "recordSet" : [ + { + "id" : "1e997322-b813-437b-b2e2-dae732f0cf7f", + "type" : "Subscription", + "subscriptionId" : "{unique CSP subscription ID}", + "personDetails" : { + "lastName" : "Last", + "firstName" : "First" + } + } + ] +} \ No newline at end of file diff --git a/103705/generate_docs.py b/103705/generate_docs.py new file mode 100644 index 0000000..8837e1f --- /dev/null +++ b/103705/generate_docs.py @@ -0,0 +1,2 @@ +import json +from pathlib import Path diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json new file mode 100644 index 0000000..34e34a7 --- /dev/null +++ b/103705/schema/etsi_types.schema.json @@ -0,0 +1,82 @@ +{ + "$id": "etsi.org_ts103705_1.3.1_etsi-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": { + "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 should be indicated by the CSP schema" + }, + "required" : ["destination"] + } + }, + "Subscription": { + "type": "object", + "title": "Subscription", + "description": "Basic subscription record", + "properties": { + "subscriptionId": { + "title" : "Subscription Identifier", + "description" : "Unique identifier for a subscription within the CSP", + "type": "string" + }, + "startDate": { + "title" : "Subscription Start Date", + "description" : "Date that the subscription started", + "$ref": "ts_103280_2017_07#/$defs/UTCDateTime" + }, + "endDate": { + "title" : "Subscription End Date", + "description" : "Date that the subscription ended", + "$ref": "ts_103280_2017_07#/$defs/UTCDateTime" + } + }, + "required" : ["subscriptionId"] + }, + "PersonDetails": { + "type": "object", + "title": "Person Details", + "description": "Details about a person", + "properties": { + "forename": { + "title" : "Forename", + "description" : "Forename(s)", + "type": "string" + }, + "middeName": { + "title" : "First Name", + "description" : "Middle name(s), given as a space-delimited string", + "type": "string" + }, + "lastName" : { + "title" : "Family Name", + "description" : "Family name(s)", + "type" : "string" + }, + "birthDate" : { + "title" : "Date of Birth", + "description" : "Date of birth (time part can be ignored)", + "$ref" : "ts_103280_2017_07#/$defs/DateTime" + }, + "gender" : { + "title" : "Gender", + "description" : "Gender of the person", + "type" : "string" + } + }, + "required" : ["lastName"] + } + } +} \ 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 0000000..57e0e12 --- /dev/null +++ b/103705/schema/response.schema.json @@ -0,0 +1,77 @@ +{ + "$id": "etsi.org_ts103705_1.3.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 query (see clause 5)", + "type:": "object", + "properties": { + "recordSetDescription": { + "$ref": "#/$defs/recordSetDescription" + }, + "recordSet": { + "$ref": "#/$defs/recordSet" + } + }, + "required": [ + "recordSetDescription", + "recordSet" + ], + "$defs": { + "recordSetDescription": { + "type": "object", + "title": "RecordSetDescription", + "description": "Provides metadata about the records being delivered (see clause 5.2)", + "properties": { + "schemaId" : { "$ref" : "#/$defs/schemaId" }, + "resultSetId" : { "$ref" : "#/$defs/resultSetId"}, + "queryReference" : { "$ref" : "#/$defs/queryReference" }, + "created" : {"$ref" : "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime"}, + "recordTypes" : {"$ref" : "#/$defs/recordTypes"} + }, + "required": [ + "schemaId", "resultSetId", "queryReference", "created", "recordTypes" + ] + }, + "schemaId": { + "type": "string" + }, + "resultSetId": { + "type": "string" + }, + "queryReference": { + "type": "string" + }, + "recordSet": { + "type": "array", + "title": "RecordSet", + "description": "RecordSet (see clause 5.3). Contains a set of Records.", + "items": { + "$ref": "#$defs/record" + } + }, + "recordTypes" : { + "type" : "object", + "title" : "RecordTypes", + "description" : "Dictionary of types used by the Response document (see clause 5.2.6)" + }, + "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" : "Type identifier, shall be mapped to a schema reference via the recrdTypes map (see clauses 5.2.6 and 5.3.3)" + } + }, + "required": [ + "id", "type" + ] + } + } +} \ No newline at end of file diff --git a/103705/validate.py b/103705/validate.py new file mode 100644 index 0000000..fa54909 --- /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 0000000..bb6913d --- /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 -- GitLab From d585ccc5e3bfc77bc61c91a507f70e12caf18be3 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 30 Apr 2024 10:20:23 +0100 Subject: [PATCH 02/41] Adding more examples --- 103705/config.json | 35 + 103705/examples/csp_a.schema.json | 64 -- 103705/examples/csp_a_results.json | 22 - .../examples/example1/csp_records.schema.json | 25 + 103705/examples/example1/csp_results.json | 42 ++ 103705/examples/example1/description.txt | 6 + .../examples/example2/csp_records.schema.json | 25 + 103705/examples/example2/csp_results.json | 43 ++ .../examples/example2/csp_types.schema.json | 14 + 103705/examples/example2/description.txt | 8 + .../examples/example3/csp_records.schema.json | 25 + 103705/examples/example3/csp_results.json | 34 + .../examples/example3/csp_types.schema.json | 38 + 103705/examples/example3/description.txt | 8 + 103705/questions.txt | 49 ++ 103705/schema/etsi_types.schema.json | 657 ++++++++++++++++-- 103705/schema/records.schema.json | 23 + 103705/schema/response.schema.json | 41 +- 18 files changed, 1003 insertions(+), 156 deletions(-) create mode 100644 103705/config.json delete mode 100644 103705/examples/csp_a.schema.json delete mode 100644 103705/examples/csp_a_results.json create mode 100644 103705/examples/example1/csp_records.schema.json create mode 100644 103705/examples/example1/csp_results.json create mode 100644 103705/examples/example1/description.txt create mode 100644 103705/examples/example2/csp_records.schema.json create mode 100644 103705/examples/example2/csp_results.json create mode 100644 103705/examples/example2/csp_types.schema.json create mode 100644 103705/examples/example2/description.txt create mode 100644 103705/examples/example3/csp_records.schema.json create mode 100644 103705/examples/example3/csp_results.json create mode 100644 103705/examples/example3/csp_types.schema.json create mode 100644 103705/examples/example3/description.txt create mode 100644 103705/questions.txt create mode 100644 103705/schema/records.schema.json diff --git a/103705/config.json b/103705/config.json new file mode 100644 index 0000000..a7a6484 --- /dev/null +++ b/103705/config.json @@ -0,0 +1,35 @@ +[{ + "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" + ] +}] \ No newline at end of file diff --git a/103705/examples/csp_a.schema.json b/103705/examples/csp_a.schema.json deleted file mode 100644 index febb70a..0000000 --- a/103705/examples/csp_a.schema.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$id": "example.com_csp-a-schema_1.2.3", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "Example extended schema for CSP A. This CSP only ever has one person associated with a subscription - the account holder - and so composes a Subscription record from the ETSI-standard Subscription and PersonDetails entities", - "allOf": [ - { - "$ref": "http://etsi.org/temp/705" - }, - { - "type": "object", - "properties": { - "recordSet": { - "type": "array", - "items": { - "$ref": "#/$defs/definedRecords" - } - } - }, - "required": [ - "recordSet" - ] - } - ], - "$defs": { - "definedRecords": { - "title" : "Defined Records", - "description" : "Sets out what the valid set of Record types is for this CSP. It is expressed as a 'oneOf' list, each of which combines a type identifier and a reference to the type that is used to validate the record", - "oneOf": [ - { - "allOf": [ - { - "type": "object", - "title" : "Subscriber record", - "description" : "Uses the ETSI-standard subscriber record (the first $ref), extended to include person details (the second $ref)", - "properties": { - "type": { - "const": "Subscription" - } - } - }, - { - "description" : "Uses the basic ETSI-standard subscriber record fields as a base", - "$ref": "http://etsi.org/temp/705/entities#/$defs/Subscription" - }, - { - "description" : "Extends the basic ETSI standard subscriber record according to the definition in extendedSubscriberRecord", - "$ref": "#/$defs/extendedSubscriberRecord" - } - ] - } - ] - }, - "extendedSubscriberRecord" : { - "title" : "Extended Subscriber Record", - "description" : "Here CSP A can describe all the extra fields that they want to put in their subscriber record. In this case, they just add the details of the account holder using the ETSI-standard PersonDetails type", - "properties" : { - "title" : "Account Holder", - "description" : "Name and date of birth of the account holder for the description", - "accountHolder" : { "$ref" : "http://etsi.org/temp/705/entities#/$defs/PersonDetails"} - }, - "required" : ["personDetails"] - } - } -} \ No newline at end of file diff --git a/103705/examples/csp_a_results.json b/103705/examples/csp_a_results.json deleted file mode 100644 index e142485..0000000 --- a/103705/examples/csp_a_results.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "recordSetDescription" : { - "schemaId" : "etsi.org/ts_103_705/1.1.1", - "resultSetId" : "788e190d-fb2e-416e-9798-12a66ebe0a1a", - "queryReference" : "LDID_1", - "created" : "2023-06-08T09:31:56.000000Z", - "recordTypes" : { - "Subscription" : "example.com_csp-a-schema_1.2.3#$defs/extendedSubscriberRecord" - } - }, - "recordSet" : [ - { - "id" : "1e997322-b813-437b-b2e2-dae732f0cf7f", - "type" : "Subscription", - "subscriptionId" : "{unique CSP subscription ID}", - "personDetails" : { - "lastName" : "Last", - "firstName" : "First" - } - } - ] -} \ 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 0000000..08ccf9f --- /dev/null +++ b/103705/examples/example1/csp_records.schema.json @@ -0,0 +1,25 @@ +{ + "$id": "etsi.org_ts103705_records", + "$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)", + "owner" : "Example CSP", + "cspSchemaID" : "csp.example_1", + "dateIssued" : "2024-04-024T09:00:01Z", + "version" : "1.1.1", + "$defs": { + "record" : { + "oneOf" : [{ + "allOf" : [ + { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall" }, + { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall"}}} + ]}, + { + "allOf" : [ + { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationMessaging" }, + { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationMessaging"}}} + ]} + ] + } + } +} \ 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 0000000..eb31016 --- /dev/null +++ b/103705/examples/example1/csp_results.json @@ -0,0 +1,42 @@ +{ + "recordSetDescription": { + "schemaId": "etsi.org/ts_103_705/1.1.1", + "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", + "queryReference": "LDID", + "created": "2024-04-25T09:31:56.000000Z" + }, + "recordSet": [ + { + "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", + "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall", + "timeBegin": "2024-04-20T10:04:00.000000Z", + "timeEnd": "2024-04-20T10:05:00.000000Z", + "endReason": 16, + "parties": [ + { + "identity": {"mSISDN": "491713920067"}, + "role": "originating" + }, + { + "identity": {"mSISDN": "441632960123"}, + "role": "terminating" + } + ] + }, + { + "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", + "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationMessaging", + "timeBegin": "2024-04-18T10:04:00.000000Z", + "parties": [ + { + "identity": {"mSISDN": "441632960123"}, + "role": "sender" + }, + { + "identity": {"mSISDN": "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 0000000..1e567ac --- /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 0000000..774cb7d --- /dev/null +++ b/103705/examples/example2/csp_records.schema.json @@ -0,0 +1,25 @@ +{ + "$id": "etsi.org_ts103705_records", + "$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)", + "owner" : "Example CSP", + "cspSchemaID" : "csp.example_2", + "dateIssued" : "2024-04-024T09:00:01Z", + "version" : "1.1.1", + "$defs": { + "record" : { + "oneOf" : [{ + "allOf" : [ + { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall" }, + { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall"}}} + ]}, + { + "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 0000000..14a0804 --- /dev/null +++ b/103705/examples/example2/csp_results.json @@ -0,0 +1,43 @@ +{ + "recordSetDescription": { + "schemaId": "etsi.org/ts_103_705/1.1.1", + "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", + "queryReference": "LDID", + "created": "2024-04-25T09:31:56.000000Z" + }, + "recordSet": [ + { + "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", + "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall", + "timeBegin": "2024-04-20T10:04:00.000000Z", + "timeEnd": "2024-04-20T10:05:00.000000Z", + "endReason": 16, + "parties": [ + { + "identity": {"mSISDN": "491713920067"}, + "role": "originating" + }, + { + "identity": {"mSISDN": "441632960123"}, + "role": "terminating" + } + ] + }, + { + "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", + "type": "csp_example_types#/$defs/CSPMessagingRecord", + "timeBegin": "2024-04-18T10:04:00.000000Z", + "parties": [ + { + "identity": {"mSISDN": "441632960123"}, + "role": "sender" + }, + { + "identity": {"mSISDN": "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 0000000..d0d04d8 --- /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" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationMessaging"}], + "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 0000000..1b22fdf --- /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 0000000..6550acb --- /dev/null +++ b/103705/examples/example3/csp_records.schema.json @@ -0,0 +1,25 @@ +{ + "$id": "etsi.org_ts103705_records", + "$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)", + "owner" : "Example CSP", + "cspSchemaID" : "csp.example_3", + "dateIssued" : "2024-04-024T09:00:01Z", + "version" : "1.1.1", + "$defs": { + "record" : { + "oneOf" : [{ + "allOf" : [ + { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall" }, + { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall"}}} + ]}, + { + "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 0000000..4f88e97 --- /dev/null +++ b/103705/examples/example3/csp_results.json @@ -0,0 +1,34 @@ +{ + "recordSetDescription": { + "schemaId": "etsi.org/ts_103_705/1.1.1", + "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", + "queryReference": "LDID", + "created": "2024-04-25T09:31:56.000000Z" + }, + "recordSet": [ + { + "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", + "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall", + "timeBegin": "2024-04-20T10:04:00.000000Z", + "timeEnd": "2024-04-20T10:05:00.000000Z", + "endReason": 16, + "parties": [ + { + "identity": {"mSISDN": "491713920067"}, + "role": "originating" + }, + { + "identity": {"mSISDN": "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 0000000..0299c7d --- /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" : "etsi.org_ts103705_1.3.1_etsi-types#/$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 0000000..a72d3ca --- /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/questions.txt b/103705/questions.txt new file mode 100644 index 0000000..58a8805 --- /dev/null +++ b/103705/questions.txt @@ -0,0 +1,49 @@ +----- + +CSP wants to use completely standard records + +CSP wants to use a mix of standard records and extended ones + +CSP wants to use a completely novel type of record + +CSP wants self-contained records (non-normalised) + +CSP wants normalised pointer records (requires extension) + +----- + +(Also consider our extensions i.e. version management) +(Also consider allocating a urn for our schema namespaces) + +Wondering whether title + description really adds anything. Maybe only need description? + +Also need descriptions in with ref (description of field is different to description of type) + +----- + +Lots of overlap in e.g. messaging / call. Could we factor out common bits and use allOf constraint? + +Subtle problem with "oneOf" constraint +e.g. InformationCall and InformationMessaging validate nearly the same documents +(so e.g using "originating" and "terminating" in PartyMessaging works just fine - even though it shouldn't) +More seriously - if you only use fields common to both, "oneOf" fails because the instance document can match multiple. +Could solve both of these by setting the "type" to a constant (but maintenance overhead) +BUT this would cause issues with using allOf to extend things +Maybe factor out record from type? i.e. CallRecord = CallInformation + type = blah +OR make that part of the convention when importing in the record schema (i.e a record definition has +to include a allOf (type) + type (const) declaration) + +Q.850 end reason +- Is this always valid (i.e. non-PSTN call)? Or is it the other way round (provide it if you have one, don't if you don't) +- Can it be more constrained (it's a 7-bit field and 0 isn't valid, so 1-127?) + +InformationMessaging +- does "timeBegin" and "timeEnd" make sense if this is a single messaging event? +- descriptions should ideally describe meaning as well as format (i.e. not just talking about trailing zeroes) + +----- + +JSON test issues +- globbing dirs from config file breaks +- RefResolutionError raises exception into calling process rather than a BuildError (sort of fixed now) +- RefResolution wasn't extended to all supporting schemas (now is, but all lumped under main file - fix) diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index 34e34a7..4179e44 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -4,79 +4,630 @@ "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)" + "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 should be indicated by the CSP schema" + "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"] + "required": [ + "destination" + ] } }, - "Subscription": { + "InformationCall": { "type": "object", - "title": "Subscription", - "description": "Basic subscription record", + "title": "Information about call details", + "description": "Details about a record or event related to a call", + "required": [ + "timeBegin" + ], "properties": { - "subscriptionId": { - "title" : "Subscription Identifier", - "description" : "Unique identifier for a subscription within the CSP", + "sessionRefId": { + "type": "string", + "description": "A reference identifier to uniquely identify the telephony call" + }, + "timeBegin": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "timeEnd": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "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/PartyInformationCall" + } + }, + "endReason": { + "type": "integer", + "description": "ITU Q.850" + }, + "bearer": { + "$ref": "#/$defs/Bearer", + "description": "In case one set of bearer information is availble" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "InformationMessaging": { + "type": "object", + "title": "Information about messaging details", + "description": "Details about a record or event related to a message", + "required": [ + "timeBegin" + ], + "properties": { + "sessionRefId": { + "type": "string", + "description": "A reference identifier to uniquely identify the message" + }, + "timeBegin": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "timeEnd": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "parties": { + "type": "array", + "items": { + "$ref": "#/$defs/PartyInformationMessaging" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "InformationEmail": { + "type": "object", + "title": "Information about email details", + "description": "Details about a record or event related to an email", + "required": [ + "timeBegin" + ], + "properties": { + "sessionRefId": { + "type": "string", + "description": "A reference identifier to uniquely identify the message" + }, + "timeBegin": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "timeEnd": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "parties": { + "type": "array", + "items": { + "$ref": "#/$defs/PartyInformationEmail" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "InformationChat": { + "type": "object", + "title": "Information about chat details", + "description": "Details about a record or event related to a chat", + "required": [ + "timeBegin" + ], + "properties": { + "sessionRefId": { + "type": "string", + "description": "A reference identifier to uniquely identify the message" + }, + "timeBegin": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "timeEnd": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "parties": { + "type": "array", + "items": { + "$ref": "#/$defs/PartyInformationChat" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "InformationData": { + "type": "object", + "title": "Information about email details", + "description": "Details about a record or event related to an email", + "required": [ + "timeBegin" + ], + "properties": { + "sessionRefId": { + "type": "string", + "description": "A reference identifier to uniquely identify the message" + }, + "timeBegin": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "timeEnd": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "parties": { + "type": "array", + "items": { + "$ref": "#/$defs/PartyInformationEmail" + } + }, + "volume": { + "$ref": "#/$defs/DataVolume" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "InformationOther": { + "type": "object", + "title": "Information about other details", + "description": "Details about a record or event which can not by fitted in any of the above structures", + "required": [ + "timeBegin" + ], + "properties": { + "sessionRefId": { + "type": "string", + "description": "A reference identifier to uniquely identify the message" + }, + "timeBegin": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "timeEnd": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "parties": { + "type": "array", + "items": { + "$ref": "#/$defs/PartyInformationOther" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyInformationCall": { + "type": "object", + "properties": { + "identity": { + "$ref": "#/$defs/PartyIdCall" + }, + "role": { + "enum": [ + "originating", + "terminating", + "forwarding", + "unknown" + ] + }, + "bearer": { + "$ref": "#/$defs/Bearer", + "description": "For bearer information specific for this party" + }, + "locations": { + "type": "array", + "items": { + "$ref": "#/$defs/Location" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyInformationMessaging": { + "type": "object", + "properties": { + "identity": { + "$ref": "#/$defs/PartyIdMessaging" + }, + "role": { + "enum": [ + "sender", + "receiver" + ] + }, + "bearer": { + "$ref": "#/$defs/Bearer", + "description": "For bearer information specific for this party" + }, + "locations": { + "type": "array", + "items": { + "$ref": "#/$defs/Location" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyInformationEmail": { + "type": "object", + "properties": { + "identity": { + "$ref": "#/$defs/PartyIdEmail" + }, + "role": { + "enum": [ + "sender", + "receiver" + ] + }, + "bearer": { + "$ref": "#/$defs/Bearer", + "description": "For bearer information specific for this party" + }, + "locations": { + "type": "array", + "items": { + "$ref": "#/$defs/Location" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyInformationChat": { + "type": "object", + "properties": { + "identity": { + "$ref": "#/$defs/PartyIdChat" + }, + "bearer": { + "$ref": "#/$defs/Bearer", + "description": "For bearer information specific for this party" + }, + "locations": { + "type": "array", + "items": { + "$ref": "#/$defs/Location" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyInformationData": { + "type": "object", + "properties": { + "identity": { + "$ref": "#/$defs/PartyIdData" + }, + "aPN": { + "type": "string" + }, + "dNN": { "type": "string" }, - "startDate": { - "title" : "Subscription Start Date", - "description" : "Date that the subscription started", - "$ref": "ts_103280_2017_07#/$defs/UTCDateTime" + "bearer": { + "$ref": "#/$defs/Bearer", + "description": "For bearer information specific for this party" }, - "endDate": { - "title" : "Subscription End Date", - "description" : "Date that the subscription ended", - "$ref": "ts_103280_2017_07#/$defs/UTCDateTime" + "locations": { + "type": "array", + "items": { + "$ref": "#/$defs/Location" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" } - }, - "required" : ["subscriptionId"] + } }, - "PersonDetails": { + "PartyInformationOther": { "type": "object", - "title": "Person Details", - "description": "Details about a person", "properties": { - "forename": { - "title" : "Forename", - "description" : "Forename(s)", + "identity": { + "$ref": "#/$defs/PartyIdOther" + }, + "bearer": { + "$ref": "#/$defs/Bearer", + "description": "For bearer information specific for this party" + }, + "locations": { + "type": "array", + "items": { + "$ref": "#/$defs/Location" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyIdCall": { + "type": "object", + "properties": { + "mSISDN": { + "$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" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyIdMessaging": { + "type": "object", + "properties": { + "mSISDN": { + "$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" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyIdEmail": { + "type": "object", + "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" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyIdChat": { + "type": "object", + "properties": { + "ServiceAccessIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/ServiceAccessIdentifier" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyIdData": { + "type": "object", + "properties": { + "mSISDN": { + "$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" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyIdOther": { + "type": "object", + "properties": { + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "// ==== Leaf data types ====": {}, + "DataVolume": { + "type": "object", + "properties": { + "bytesUpload": { + "type": "integer" + }, + "bytesDownload": { + "type": "integer" + }, + "bytesTotal": { + "type": "integer" + } + } + }, + "Bearer": { + "type": "object", + "properties": { + "technology": { + "enum": [ + "2G", + "3G", + "4G", + "5G", + "fiber", + "cable", + "wifi" + ], + "description": "The technology used; exceptions in 'extensions'" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "Location": { + "type": "object", + "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" + }, + "streetAddress": { + "$ref": "#/$defs/StreetAddress" + }, + "coord": { + "$ref": "ts_103280_2017_07#/$defs/WGS84CoordinateDecimal" + }, + "radius": { + "$ref": "#/$defs/Radius" + }, + "azimuth": { + "$ref": "#/$defs/Azimuth" + }, + "coordPolygon": { + "type": "array", + "items": { + "$ref": "ts_103280_2017_07#/$defs/WGS84CoordinateDecimal" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "Radius": { + "type": "integer", + "minimum": 1, + "description": "Radius in meters // maybe move to TS 103 280" + }, + "Azimuth": { + "type": "integer", + "minimum": 0, + "exclusiveMaximum": 360, + "description": "Degrees; 0 = north, 90 = east // maybe move to TS 103 280" + }, + "StreetAddress": { + "type": "object", + "properties": { + "country": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + }, + "state": { "type": "string" }, - "middeName": { - "title" : "First Name", - "description" : "Middle name(s), given as a space-delimited string", + "province": { "type": "string" }, - "lastName" : { - "title" : "Family Name", - "description" : "Family name(s)", - "type" : "string" + "city": { + "type": "string" }, - "birthDate" : { - "title" : "Date of Birth", - "description" : "Date of birth (time part can be ignored)", - "$ref" : "ts_103280_2017_07#/$defs/DateTime" + "street": { + "type": "string" }, - "gender" : { - "title" : "Gender", - "description" : "Gender of the person", - "type" : "string" + "number": { + "type": "string" + }, + "numberExtension": { + "type": "string" + }, + "zip": { + "type": "string" } - }, - "required" : ["lastName"] + } } } } \ No newline at end of file diff --git a/103705/schema/records.schema.json b/103705/schema/records.schema.json new file mode 100644 index 0000000..dab4f07 --- /dev/null +++ b/103705/schema/records.schema.json @@ -0,0 +1,23 @@ +{ + "$id": "etsi.org_ts103705_records", + "$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)", + "owner" : "{replace with owner - see TS 103 705 Table 6.3}", + "cspSchemaID" : "{replace with assigned ID - see TS 103 705 Table 6.3}", + "dateIssued" : "{replace with date issued - see TS 103 705 Table 6.3}", + "version" : "{Replace with version - see TS 103 705 Table 6.3", + "$defs": { + "record" : { + "oneOf" : [ + { + "$comment" : "This is an example", + "allOf" : [ + { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall" }, + { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall"}}} + ] + } + ] + } + } +} \ No newline at end of file diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json index 57e0e12..d70b464 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -22,14 +22,24 @@ "title": "RecordSetDescription", "description": "Provides metadata about the records being delivered (see clause 5.2)", "properties": { - "schemaId" : { "$ref" : "#/$defs/schemaId" }, - "resultSetId" : { "$ref" : "#/$defs/resultSetId"}, - "queryReference" : { "$ref" : "#/$defs/queryReference" }, - "created" : {"$ref" : "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime"}, - "recordTypes" : {"$ref" : "#/$defs/recordTypes"} + "schemaId": { + "$ref": "#/$defs/schemaId" + }, + "resultSetId": { + "$ref": "#/$defs/resultSetId" + }, + "queryReference": { + "$ref": "#/$defs/queryReference" + }, + "created": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime" + } }, "required": [ - "schemaId", "resultSetId", "queryReference", "created", "recordTypes" + "schemaId", + "resultSetId", + "queryReference", + "created" ] }, "schemaId": { @@ -37,10 +47,10 @@ }, "resultSetId": { "type": "string" - }, + }, "queryReference": { "type": "string" - }, + }, "recordSet": { "type": "array", "title": "RecordSet", @@ -49,12 +59,8 @@ "$ref": "#$defs/record" } }, - "recordTypes" : { - "type" : "object", - "title" : "RecordTypes", - "description" : "Dictionary of types used by the Response document (see clause 5.2.6)" - }, "record": { + "allOf" : [{ "$ref" : "etsi.org_ts103705_records#/$defs/record"}], "type": "object", "title": "Record", "description": "Response record (see clause 5.3)", @@ -64,13 +70,14 @@ "description": "Unique identifier for the Record within the RecordSet (see clause 5.3.2).", "type": "string" }, - "type" : { - "title" : "type", - "description" : "Type identifier, shall be mapped to a schema reference via the recrdTypes map (see clauses 5.2.6 and 5.3.3)" + "type": { + "title": "type", + "description": "Type identifier, shall be mapped to a schema reference via the recrdTypes map (see clauses 5.2.6 and 5.3.3)" } }, "required": [ - "id", "type" + "id", + "type" ] } } -- GitLab From 2c43de85ad98a7767e6ae59b6c1bb1bfe73035ee Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 30 Apr 2024 14:00:44 +0100 Subject: [PATCH 03/41] Adding more examples --- 103705/config.json | 12 +++++ .../examples/example4/csp_records.schema.json | 24 ++++++++++ 103705/examples/example4/csp_results.json | 27 +++++++++++ .../examples/example4/csp_types.schema.json | 46 +++++++++++++++++++ 103705/examples/example4/description.txt | 8 ++++ 103705/questions.txt | 19 +++++--- 6 files changed, 130 insertions(+), 6 deletions(-) create mode 100644 103705/examples/example4/csp_records.schema.json create mode 100644 103705/examples/example4/csp_results.json create mode 100644 103705/examples/example4/csp_types.schema.json create mode 100644 103705/examples/example4/description.txt diff --git a/103705/config.json b/103705/config.json index a7a6484..aaea455 100644 --- a/103705/config.json +++ b/103705/config.json @@ -32,4 +32,16 @@ "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" + ] }] \ No newline at end of file diff --git a/103705/examples/example4/csp_records.schema.json b/103705/examples/example4/csp_records.schema.json new file mode 100644 index 0000000..5960331 --- /dev/null +++ b/103705/examples/example4/csp_records.schema.json @@ -0,0 +1,24 @@ +{ + "$id": "etsi.org_ts103705_records", + "$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)", + "owner" : "Example CSP", + "cspSchemaID" : "csp.example_4", + "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 0000000..be9c901 --- /dev/null +++ b/103705/examples/example4/csp_results.json @@ -0,0 +1,27 @@ +{ + "recordSetDescription": { + "schemaId": "etsi.org/ts_103_705/1.1.1", + "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", + "queryReference": "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 0000000..4d88812 --- /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" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/Pointer" + }, + "deliveryAddress" : { + "description" : "Points to the address used for delivery", + "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/Pointer" + }, + "billingAddress" : { + "description" : "Points to the address used for billing", + "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/Pointer" + }, + "contactAddress" : { + "description" : "Points to the address used for mailing purposes", + "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$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 0000000..b4169d5 --- /dev/null +++ b/103705/examples/example4/description.txt @@ -0,0 +1,8 @@ +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 diff --git a/103705/questions.txt b/103705/questions.txt index 58a8805..b7f0710 100644 --- a/103705/questions.txt +++ b/103705/questions.txt @@ -1,17 +1,19 @@ ----- -CSP wants to use completely standard records +Examples: -CSP wants to use a mix of standard records and extended ones +Example 1: CSP uses completely standard records -CSP wants to use a completely novel type of record +Example 2: CSP uses a mix of standard records and extended ones -CSP wants self-contained records (non-normalised) +Example 3: CSP uses a completely novel type of record -CSP wants normalised pointer records (requires extension) +Example 4: CSP uses normalised pointer records ----- +705 structure questions: + (Also consider our extensions i.e. version management) (Also consider allocating a urn for our schema namespaces) @@ -21,7 +23,9 @@ Also need descriptions in with ref (description of field is different to descrip ----- -Lots of overlap in e.g. messaging / call. Could we factor out common bits and use allOf constraint? +New "standard type" questions: + +There is lots of overlap in e.g. messaging / call. Could we factor out common bits and use allOf constraint? Subtle problem with "oneOf" constraint e.g. InformationCall and InformationMessaging validate nearly the same documents @@ -41,6 +45,9 @@ InformationMessaging - does "timeBegin" and "timeEnd" make sense if this is a single messaging event? - descriptions should ideally describe meaning as well as format (i.e. not just talking about trailing zeroes) +Extensions +- Are they needed? Also not sure how they work with enums + ----- JSON test issues -- GitLab From ad811c9cf8b0a82cc433fb79be0bf392b652dc91 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 1 May 2024 08:26:23 +0100 Subject: [PATCH 04/41] Matching doc --- 103705/examples/example1/csp_results.json | 4 +++- 103705/examples/example2/csp_results.json | 4 +++- 103705/examples/example3/csp_results.json | 4 +++- 103705/examples/example4/csp_results.json | 4 +++- 103705/schema/response.schema.json | 15 +++++++++++++-- 5 files changed, 25 insertions(+), 6 deletions(-) diff --git a/103705/examples/example1/csp_results.json b/103705/examples/example1/csp_results.json index eb31016..fda316d 100644 --- a/103705/examples/example1/csp_results.json +++ b/103705/examples/example1/csp_results.json @@ -1,6 +1,8 @@ { "recordSetDescription": { - "schemaId": "etsi.org/ts_103_705/1.1.1", + "etsiSchemaId": "etsi.org/ts_103_705/1.1.1", + "etsiVersion": "1.1.1", + "cspSchemaId" : "csp.example_1", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" diff --git a/103705/examples/example2/csp_results.json b/103705/examples/example2/csp_results.json index 14a0804..f6700b1 100644 --- a/103705/examples/example2/csp_results.json +++ b/103705/examples/example2/csp_results.json @@ -1,6 +1,8 @@ { "recordSetDescription": { - "schemaId": "etsi.org/ts_103_705/1.1.1", + "etsiSchemaId": "etsi.org/ts_103_705/1.1.1", + "etsiVersion": "1.1.1", + "cspSchemaId" : "csp.example_2", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" diff --git a/103705/examples/example3/csp_results.json b/103705/examples/example3/csp_results.json index 4f88e97..4c94424 100644 --- a/103705/examples/example3/csp_results.json +++ b/103705/examples/example3/csp_results.json @@ -1,6 +1,8 @@ { "recordSetDescription": { - "schemaId": "etsi.org/ts_103_705/1.1.1", + "etsiSchemaId": "etsi.org/ts_103_705/1.1.1", + "etsiVersion": "1.1.1", + "cspSchemaId" : "csp.example_3", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" diff --git a/103705/examples/example4/csp_results.json b/103705/examples/example4/csp_results.json index be9c901..d16548b 100644 --- a/103705/examples/example4/csp_results.json +++ b/103705/examples/example4/csp_results.json @@ -1,6 +1,8 @@ { "recordSetDescription": { - "schemaId": "etsi.org/ts_103_705/1.1.1", + "etsiSchemaId": "etsi.org/ts_103_705/1.1.1", + "etsiVersion": "1.1.1", + "cspSchemaId" : "csp.example_4", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json index d70b464..cc7f92e 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -22,7 +22,16 @@ "title": "RecordSetDescription", "description": "Provides metadata about the records being delivered (see clause 5.2)", "properties": { - "schemaId": { + "etsiSchemaId": { + "description" : "ID of the ETSI JSON schema used by the Response (see clause 5.2.1)", + "$ref": "#/$defs/schemaId" + }, + "etsiVersion": { + "description" : "Version of ETSI TS 103 705 usd by the Response (see clause 5.2.3)", + "$ref": "#/$defs/schemaId" + }, + "cspSchemaId" : { + "description" : "ID of CSP Record Schema usd by the Response (see clause 5.2.4)", "$ref": "#/$defs/schemaId" }, "resultSetId": { @@ -36,7 +45,9 @@ } }, "required": [ - "schemaId", + "etsiSchemaId", + "etsiVersion", + "cspSchemaId", "resultSetId", "queryReference", "created" -- GitLab From 54606fec6d2d7d9533af824bfd2694f835345317 Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 9 May 2024 10:54:55 +0100 Subject: [PATCH 05/41] Updates from Herbert and Frank --- 103705/schema/etsi_types.schema.json | 71 ++-------------------------- 103705/schema/response.schema.json | 2 +- 2 files changed, 5 insertions(+), 68 deletions(-) diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index 4179e44..3d1e029 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -65,9 +65,6 @@ "bearer": { "$ref": "#/$defs/Bearer", "description": "In case one set of bearer information is availble" - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -96,9 +93,6 @@ "items": { "$ref": "#/$defs/PartyInformationMessaging" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -127,9 +121,6 @@ "items": { "$ref": "#/$defs/PartyInformationEmail" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -158,9 +149,6 @@ "items": { "$ref": "#/$defs/PartyInformationChat" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -192,9 +180,6 @@ }, "volume": { "$ref": "#/$defs/DataVolume" - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -223,9 +208,6 @@ "items": { "$ref": "#/$defs/PartyInformationOther" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -252,9 +234,6 @@ "items": { "$ref": "#/$defs/Location" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -279,9 +258,6 @@ "items": { "$ref": "#/$defs/Location" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -306,9 +282,6 @@ "items": { "$ref": "#/$defs/Location" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -327,9 +300,6 @@ "items": { "$ref": "#/$defs/Location" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -354,9 +324,6 @@ "items": { "$ref": "#/$defs/Location" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -375,9 +342,6 @@ "items": { "$ref": "#/$defs/Location" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -401,9 +365,6 @@ }, "unstructuredPhoneNumber": { "type": "string" - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -427,9 +388,6 @@ }, "unstructuredPhoneNumber": { "type": "string" - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -444,9 +402,6 @@ }, "iPv6Address": { "$ref": "ts_103280_2017_07#/$defs/IPv6Address" - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -455,9 +410,6 @@ "properties": { "ServiceAccessIdentifier": { "$ref": "ts_103280_2017_07#/$defs/ServiceAccessIdentifier" - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -502,20 +454,10 @@ }, "unstructuredPhoneNumber": { "type": "string" - }, - "extensions": { - "$ref": "#/$defs/Extensions" - } - } - }, - "PartyIdOther": { - "type": "object", - "properties": { - "extensions": { - "$ref": "#/$defs/Extensions" } } }, + "// ==== Leaf data types ====": {}, "DataVolume": { "type": "object", @@ -544,11 +486,9 @@ "cable", "wifi" ], - "description": "The technology used; exceptions in 'extensions'" - }, - "extensions": { - "$ref": "#/$defs/Extensions" + "description": "The technology used;" } + } }, "Location": { @@ -583,9 +523,6 @@ "items": { "$ref": "ts_103280_2017_07#/$defs/WGS84CoordinateDecimal" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -630,4 +567,4 @@ } } } -} \ No newline at end of file +} diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json index cc7f92e..d3372af 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -83,7 +83,7 @@ }, "type": { "title": "type", - "description": "Type identifier, shall be mapped to a schema reference via the recrdTypes map (see clauses 5.2.6 and 5.3.3)" + "description": "A JSON Pointer to the schema definition that defines the type (see clause 5.3.3)" } }, "required": [ -- GitLab From 1bf10b546a6bfba5e187ba5b457b39540b8e0664 Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 16 May 2024 15:21:16 +0100 Subject: [PATCH 06/41] Initial renaming following call, and removing Chat+Other --- .../examples/example1/csp_records.schema.json | 8 +- 103705/examples/example1/csp_results.json | 4 +- .../examples/example2/csp_records.schema.json | 4 +- 103705/examples/example2/csp_results.json | 2 +- .../examples/example2/csp_types.schema.json | 2 +- .../examples/example3/csp_records.schema.json | 4 +- 103705/examples/example3/csp_results.json | 2 +- 103705/questions.txt | 6 + 103705/schema/etsi_types.schema.json | 158 +++--------------- 9 files changed, 43 insertions(+), 147 deletions(-) diff --git a/103705/examples/example1/csp_records.schema.json b/103705/examples/example1/csp_records.schema.json index 08ccf9f..8b337d5 100644 --- a/103705/examples/example1/csp_records.schema.json +++ b/103705/examples/example1/csp_records.schema.json @@ -11,13 +11,13 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall" }, - { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall"}}} + { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord"}}} ]}, { "allOf" : [ - { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationMessaging" }, - { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationMessaging"}}} + { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/MessagingRecord" }, + { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/MessagingRecord"}}} ]} ] } diff --git a/103705/examples/example1/csp_results.json b/103705/examples/example1/csp_results.json index fda316d..a50fcf1 100644 --- a/103705/examples/example1/csp_results.json +++ b/103705/examples/example1/csp_results.json @@ -10,7 +10,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall", + "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, @@ -27,7 +27,7 @@ }, { "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", - "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationMessaging", + "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/MessagingRecord", "timeBegin": "2024-04-18T10:04:00.000000Z", "parties": [ { diff --git a/103705/examples/example2/csp_records.schema.json b/103705/examples/example2/csp_records.schema.json index 774cb7d..66a3081 100644 --- a/103705/examples/example2/csp_records.schema.json +++ b/103705/examples/example2/csp_records.schema.json @@ -11,8 +11,8 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall" }, - { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall"}}} + { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord"}}} ]}, { "allOf" : [ diff --git a/103705/examples/example2/csp_results.json b/103705/examples/example2/csp_results.json index f6700b1..4cbac9c 100644 --- a/103705/examples/example2/csp_results.json +++ b/103705/examples/example2/csp_results.json @@ -10,7 +10,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall", + "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, diff --git a/103705/examples/example2/csp_types.schema.json b/103705/examples/example2/csp_types.schema.json index d0d04d8..1d1006d 100644 --- a/103705/examples/example2/csp_types.schema.json +++ b/103705/examples/example2/csp_types.schema.json @@ -5,7 +5,7 @@ "description": "JSON schema for ETSI-defined types (see clause 6.1 and Annex A)", "$defs": { "CSPMessagingRecord" : { - "allOf" : [{ "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationMessaging"}], + "allOf" : [{ "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/MessagingRecord"}], "properties" : { "CSPMessagingReference" : { "$ref" : "ts_103280_2017_07#/$defs/UUID"} } diff --git a/103705/examples/example3/csp_records.schema.json b/103705/examples/example3/csp_records.schema.json index 6550acb..728b10a 100644 --- a/103705/examples/example3/csp_records.schema.json +++ b/103705/examples/example3/csp_records.schema.json @@ -11,8 +11,8 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall" }, - { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall"}}} + { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord"}}} ]}, { "allOf" : [ diff --git a/103705/examples/example3/csp_results.json b/103705/examples/example3/csp_results.json index 4c94424..077f7fd 100644 --- a/103705/examples/example3/csp_results.json +++ b/103705/examples/example3/csp_results.json @@ -10,7 +10,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall", + "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, diff --git a/103705/questions.txt b/103705/questions.txt index b7f0710..cefb6d8 100644 --- a/103705/questions.txt +++ b/103705/questions.txt @@ -1,3 +1,9 @@ +To do: + +Ensure consistent naming in the ETSI types schema +Make sure that the ETSI types schema follows the documentation guidelines +Draft a metaschema that enforces the above + ----- Examples: diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index 3d1e029..8f6b898 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -24,7 +24,7 @@ ] } }, - "InformationCall": { + "CallRecord": { "type": "object", "title": "Information about call details", "description": "Details about a record or event related to a call", @@ -55,7 +55,7 @@ "parties": { "type": "array", "items": { - "$ref": "#/$defs/PartyInformationCall" + "$ref": "#/$defs/CallPartyInformation" } }, "endReason": { @@ -68,7 +68,7 @@ } } }, - "InformationMessaging": { + "MessagingRecord": { "type": "object", "title": "Information about messaging details", "description": "Details about a record or event related to a message", @@ -80,23 +80,19 @@ "type": "string", "description": "A reference identifier to uniquely identify the message" }, - "timeBegin": { - "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", - "description": "Unknown fractions of the time to be filled-in with zeros" - }, - "timeEnd": { + "eventTime": { "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", "description": "Unknown fractions of the time to be filled-in with zeros" }, "parties": { "type": "array", "items": { - "$ref": "#/$defs/PartyInformationMessaging" + "$ref": "#/$defs/MessagingPartyInformation" } } } }, - "InformationEmail": { + "EmailRecord": { "type": "object", "title": "Information about email details", "description": "Details about a record or event related to an email", @@ -108,26 +104,22 @@ "type": "string", "description": "A reference identifier to uniquely identify the message" }, - "timeBegin": { - "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", - "description": "Unknown fractions of the time to be filled-in with zeros" - }, - "timeEnd": { + "eventTime": { "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", "description": "Unknown fractions of the time to be filled-in with zeros" }, "parties": { "type": "array", "items": { - "$ref": "#/$defs/PartyInformationEmail" + "$ref": "#/$defs/EmailPartyInformation" } } } }, - "InformationChat": { + "DataAccessRecord": { "type": "object", - "title": "Information about chat details", - "description": "Details about a record or event related to a chat", + "title": "Data Record", + "description": "Information about a data access session (e.g. a mobile data session)", "required": [ "timeBegin" ], @@ -147,35 +139,7 @@ "parties": { "type": "array", "items": { - "$ref": "#/$defs/PartyInformationChat" - } - } - } - }, - "InformationData": { - "type": "object", - "title": "Information about email details", - "description": "Details about a record or event related to an email", - "required": [ - "timeBegin" - ], - "properties": { - "sessionRefId": { - "type": "string", - "description": "A reference identifier to uniquely identify the message" - }, - "timeBegin": { - "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", - "description": "Unknown fractions of the time to be filled-in with zeros" - }, - "timeEnd": { - "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", - "description": "Unknown fractions of the time to be filled-in with zeros" - }, - "parties": { - "type": "array", - "items": { - "$ref": "#/$defs/PartyInformationEmail" + "$ref": "#/$defs/DataAccessPartyInformation" } }, "volume": { @@ -183,39 +147,11 @@ } } }, - "InformationOther": { - "type": "object", - "title": "Information about other details", - "description": "Details about a record or event which can not by fitted in any of the above structures", - "required": [ - "timeBegin" - ], - "properties": { - "sessionRefId": { - "type": "string", - "description": "A reference identifier to uniquely identify the message" - }, - "timeBegin": { - "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", - "description": "Unknown fractions of the time to be filled-in with zeros" - }, - "timeEnd": { - "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", - "description": "Unknown fractions of the time to be filled-in with zeros" - }, - "parties": { - "type": "array", - "items": { - "$ref": "#/$defs/PartyInformationOther" - } - } - } - }, - "PartyInformationCall": { + "CallPartyInformation": { "type": "object", "properties": { "identity": { - "$ref": "#/$defs/PartyIdCall" + "$ref": "#/$defs/CallPartyId" }, "role": { "enum": [ @@ -237,11 +173,11 @@ } } }, - "PartyInformationMessaging": { + "MessagingPartyInformation": { "type": "object", "properties": { "identity": { - "$ref": "#/$defs/PartyIdMessaging" + "$ref": "#/$defs/MessagingPartyId" }, "role": { "enum": [ @@ -261,11 +197,11 @@ } } }, - "PartyInformationEmail": { + "EmailPartyInformation": { "type": "object", "properties": { "identity": { - "$ref": "#/$defs/PartyIdEmail" + "$ref": "#/$defs/EmailPartyId" }, "role": { "enum": [ @@ -285,29 +221,11 @@ } } }, - "PartyInformationChat": { - "type": "object", - "properties": { - "identity": { - "$ref": "#/$defs/PartyIdChat" - }, - "bearer": { - "$ref": "#/$defs/Bearer", - "description": "For bearer information specific for this party" - }, - "locations": { - "type": "array", - "items": { - "$ref": "#/$defs/Location" - } - } - } - }, - "PartyInformationData": { + "DataAccessPartyInformation": { "type": "object", "properties": { "identity": { - "$ref": "#/$defs/PartyIdData" + "$ref": "#/$defs/DataPartyId" }, "aPN": { "type": "string" @@ -327,25 +245,7 @@ } } }, - "PartyInformationOther": { - "type": "object", - "properties": { - "identity": { - "$ref": "#/$defs/PartyIdOther" - }, - "bearer": { - "$ref": "#/$defs/Bearer", - "description": "For bearer information specific for this party" - }, - "locations": { - "type": "array", - "items": { - "$ref": "#/$defs/Location" - } - } - } - }, - "PartyIdCall": { + "CallPartyId": { "type": "object", "properties": { "mSISDN": { @@ -368,7 +268,7 @@ } } }, - "PartyIdMessaging": { + "MessagingPartyId": { "type": "object", "properties": { "mSISDN": { @@ -391,7 +291,7 @@ } } }, - "PartyIdEmail": { + "EmailPartyId": { "type": "object", "properties": { "emailAddress": { @@ -405,15 +305,7 @@ } } }, - "PartyIdChat": { - "type": "object", - "properties": { - "ServiceAccessIdentifier": { - "$ref": "ts_103280_2017_07#/$defs/ServiceAccessIdentifier" - } - } - }, - "PartyIdData": { + "DataAccessPartyId": { "type": "object", "properties": { "mSISDN": { @@ -457,8 +349,6 @@ } } }, - - "// ==== Leaf data types ====": {}, "DataVolume": { "type": "object", "properties": { -- GitLab From 5ed1429f7fa4adbb3776d0215e9d65c7a3ee1674 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 28 May 2024 14:28:56 +0100 Subject: [PATCH 07/41] Correcting recordSetDescription errors and $id values --- .../examples/example1/csp_records.schema.json | 10 +-- 103705/examples/example1/csp_results.json | 9 +-- .../examples/example2/csp_records.schema.json | 6 +- 103705/examples/example2/csp_results.json | 7 ++- .../examples/example2/csp_types.schema.json | 2 +- .../examples/example3/csp_records.schema.json | 6 +- 103705/examples/example3/csp_results.json | 7 ++- .../examples/example3/csp_types.schema.json | 2 +- .../examples/example4/csp_records.schema.json | 2 +- 103705/examples/example4/csp_results.json | 5 +- .../examples/example4/csp_types.schema.json | 8 +-- 103705/generate_docs.py | 2 - 103705/questions.txt | 62 ------------------- 103705/schema/etsi_types.schema.json | 2 +- 103705/schema/records.schema.json | 12 ++-- 103705/schema/response.schema.json | 21 +++++-- 16 files changed, 56 insertions(+), 107 deletions(-) delete mode 100644 103705/generate_docs.py delete mode 100644 103705/questions.txt diff --git a/103705/examples/example1/csp_records.schema.json b/103705/examples/example1/csp_records.schema.json index 8b337d5..e4047ba 100644 --- a/103705/examples/example1/csp_records.schema.json +++ b/103705/examples/example1/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "etsi.org_ts103705_records", + "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", "$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)", @@ -11,13 +11,13 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord"}}} + { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord"}}} ]}, { "allOf" : [ - { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/MessagingRecord" }, - { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/MessagingRecord"}}} + { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord"}}} ]} ] } diff --git a/103705/examples/example1/csp_results.json b/103705/examples/example1/csp_results.json index a50fcf1..3fc4da3 100644 --- a/103705/examples/example1/csp_results.json +++ b/103705/examples/example1/csp_results.json @@ -1,8 +1,9 @@ { "recordSetDescription": { - "etsiSchemaId": "etsi.org/ts_103_705/1.1.1", - "etsiVersion": "1.1.1", + "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", + "etsiSpecificationVersion": "0.3.0", "cspSchemaId" : "csp.example_1", + "cspSchemaVersion" : "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" @@ -10,7 +11,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord", + "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, @@ -27,7 +28,7 @@ }, { "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", - "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/MessagingRecord", + "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord", "timeBegin": "2024-04-18T10:04:00.000000Z", "parties": [ { diff --git a/103705/examples/example2/csp_records.schema.json b/103705/examples/example2/csp_records.schema.json index 66a3081..af09841 100644 --- a/103705/examples/example2/csp_records.schema.json +++ b/103705/examples/example2/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "etsi.org_ts103705_records", + "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", "$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)", @@ -11,8 +11,8 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord"}}} + { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord"}}} ]}, { "allOf" : [ diff --git a/103705/examples/example2/csp_results.json b/103705/examples/example2/csp_results.json index 4cbac9c..cdfe149 100644 --- a/103705/examples/example2/csp_results.json +++ b/103705/examples/example2/csp_results.json @@ -1,8 +1,9 @@ { "recordSetDescription": { - "etsiSchemaId": "etsi.org/ts_103_705/1.1.1", - "etsiVersion": "1.1.1", + "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", + "etsiSpecificationVersion": "0.3.0", "cspSchemaId" : "csp.example_2", + "cspSchemaVersion" : "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" @@ -10,7 +11,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord", + "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, diff --git a/103705/examples/example2/csp_types.schema.json b/103705/examples/example2/csp_types.schema.json index 1d1006d..7f2cca7 100644 --- a/103705/examples/example2/csp_types.schema.json +++ b/103705/examples/example2/csp_types.schema.json @@ -5,7 +5,7 @@ "description": "JSON schema for ETSI-defined types (see clause 6.1 and Annex A)", "$defs": { "CSPMessagingRecord" : { - "allOf" : [{ "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/MessagingRecord"}], + "allOf" : [{ "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord"}], "properties" : { "CSPMessagingReference" : { "$ref" : "ts_103280_2017_07#/$defs/UUID"} } diff --git a/103705/examples/example3/csp_records.schema.json b/103705/examples/example3/csp_records.schema.json index 728b10a..c586b79 100644 --- a/103705/examples/example3/csp_records.schema.json +++ b/103705/examples/example3/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "etsi.org_ts103705_records", + "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", "$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)", @@ -11,8 +11,8 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord"}}} + { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord"}}} ]}, { "allOf" : [ diff --git a/103705/examples/example3/csp_results.json b/103705/examples/example3/csp_results.json index 077f7fd..a2fa1d7 100644 --- a/103705/examples/example3/csp_results.json +++ b/103705/examples/example3/csp_results.json @@ -1,8 +1,9 @@ { "recordSetDescription": { - "etsiSchemaId": "etsi.org/ts_103_705/1.1.1", - "etsiVersion": "1.1.1", + "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", + "etsiSpecificationVersion": "0.3.0", "cspSchemaId" : "csp.example_3", + "cspSchemaVersion" : "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" @@ -10,7 +11,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord", + "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, diff --git a/103705/examples/example3/csp_types.schema.json b/103705/examples/example3/csp_types.schema.json index 0299c7d..c54042c 100644 --- a/103705/examples/example3/csp_types.schema.json +++ b/103705/examples/example3/csp_types.schema.json @@ -15,7 +15,7 @@ }, "dataVolumeUsed" : { "description" : "A data volume associated with this service record (using an ETSI TS 103 705 type) ", - "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/DataVolume" + "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/DataVolume" }, "numberOfService" : { "description" : "Some number associated with this service record (using a native JSON type)", diff --git a/103705/examples/example4/csp_records.schema.json b/103705/examples/example4/csp_records.schema.json index 5960331..66d9cf5 100644 --- a/103705/examples/example4/csp_records.schema.json +++ b/103705/examples/example4/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "etsi.org_ts103705_records", + "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", "$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)", diff --git a/103705/examples/example4/csp_results.json b/103705/examples/example4/csp_results.json index d16548b..cf1c20a 100644 --- a/103705/examples/example4/csp_results.json +++ b/103705/examples/example4/csp_results.json @@ -1,8 +1,9 @@ { "recordSetDescription": { - "etsiSchemaId": "etsi.org/ts_103_705/1.1.1", - "etsiVersion": "1.1.1", + "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", + "etsiSpecificationVersion": "0.3.0", "cspSchemaId" : "csp.example_4", + "cspSchemaVersion" : "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" diff --git a/103705/examples/example4/csp_types.schema.json b/103705/examples/example4/csp_types.schema.json index 4d88812..d845c24 100644 --- a/103705/examples/example4/csp_types.schema.json +++ b/103705/examples/example4/csp_types.schema.json @@ -15,19 +15,19 @@ }, "registeredAddress" : { "description" : "Points to the address registered as part of the service", - "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/Pointer" + "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/Pointer" }, "deliveryAddress" : { "description" : "Points to the address used for delivery", - "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/Pointer" + "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/Pointer" }, "billingAddress" : { "description" : "Points to the address used for billing", - "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/Pointer" + "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/Pointer" }, "contactAddress" : { "description" : "Points to the address used for mailing purposes", - "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/Pointer" + "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/Pointer" } } }, diff --git a/103705/generate_docs.py b/103705/generate_docs.py deleted file mode 100644 index 8837e1f..0000000 --- a/103705/generate_docs.py +++ /dev/null @@ -1,2 +0,0 @@ -import json -from pathlib import Path diff --git a/103705/questions.txt b/103705/questions.txt deleted file mode 100644 index cefb6d8..0000000 --- a/103705/questions.txt +++ /dev/null @@ -1,62 +0,0 @@ -To do: - -Ensure consistent naming in the ETSI types schema -Make sure that the ETSI types schema follows the documentation guidelines -Draft a metaschema that enforces the above - ------ - -Examples: - -Example 1: CSP uses completely standard records - -Example 2: CSP uses a mix of standard records and extended ones - -Example 3: CSP uses a completely novel type of record - -Example 4: CSP uses normalised pointer records - ------ - -705 structure questions: - -(Also consider our extensions i.e. version management) -(Also consider allocating a urn for our schema namespaces) - -Wondering whether title + description really adds anything. Maybe only need description? - -Also need descriptions in with ref (description of field is different to description of type) - ------ - -New "standard type" questions: - -There is lots of overlap in e.g. messaging / call. Could we factor out common bits and use allOf constraint? - -Subtle problem with "oneOf" constraint -e.g. InformationCall and InformationMessaging validate nearly the same documents -(so e.g using "originating" and "terminating" in PartyMessaging works just fine - even though it shouldn't) -More seriously - if you only use fields common to both, "oneOf" fails because the instance document can match multiple. -Could solve both of these by setting the "type" to a constant (but maintenance overhead) -BUT this would cause issues with using allOf to extend things -Maybe factor out record from type? i.e. CallRecord = CallInformation + type = blah -OR make that part of the convention when importing in the record schema (i.e a record definition has -to include a allOf (type) + type (const) declaration) - -Q.850 end reason -- Is this always valid (i.e. non-PSTN call)? Or is it the other way round (provide it if you have one, don't if you don't) -- Can it be more constrained (it's a 7-bit field and 0 isn't valid, so 1-127?) - -InformationMessaging -- does "timeBegin" and "timeEnd" make sense if this is a single messaging event? -- descriptions should ideally describe meaning as well as format (i.e. not just talking about trailing zeroes) - -Extensions -- Are they needed? Also not sure how they work with enums - ------ - -JSON test issues -- globbing dirs from config file breaks -- RefResolutionError raises exception into calling process rather than a BuildError (sort of fixed now) -- RefResolution wasn't extended to all supporting schemas (now is, but all lumped under main file - fix) diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index 8f6b898..e328506 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -1,5 +1,5 @@ { - "$id": "etsi.org_ts103705_1.3.1_etsi-types", + "$id": "urn:etsi:li:ts103705_type_schema_id:0.3.0", "$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)", diff --git a/103705/schema/records.schema.json b/103705/schema/records.schema.json index dab4f07..29d17ef 100644 --- a/103705/schema/records.schema.json +++ b/103705/schema/records.schema.json @@ -1,20 +1,20 @@ { - "$id": "etsi.org_ts103705_records", + "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", "$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)", "owner" : "{replace with owner - see TS 103 705 Table 6.3}", - "cspSchemaID" : "{replace with assigned ID - see TS 103 705 Table 6.3}", - "dateIssued" : "{replace with date issued - see TS 103 705 Table 6.3}", - "version" : "{Replace with version - see TS 103 705 Table 6.3", + "cspSchemaID" : "{replace with assigned ID - see TS 103 705 Table 6.2}", + "dateIssued" : "{replace with date issued - see TS 103 705 Table 6.2}", + "version" : "{Replace with version - see TS 103 705 Table 6.2}", "$defs": { "record" : { "oneOf" : [ { "$comment" : "This is an example", "allOf" : [ - { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall" }, - { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall"}}} + { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord"}}} ] } ] diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json index d3372af..2ab1fbf 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -1,5 +1,5 @@ { - "$id": "etsi.org_ts103705_1.3.1", + "$id": "urn:etsi:li:ts103705_schema_id:0.3.0", "$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 query (see clause 5)", @@ -26,14 +26,18 @@ "description" : "ID of the ETSI JSON schema used by the Response (see clause 5.2.1)", "$ref": "#/$defs/schemaId" }, - "etsiVersion": { + "etsiSpecificationVersion": { "description" : "Version of ETSI TS 103 705 usd by the Response (see clause 5.2.3)", - "$ref": "#/$defs/schemaId" + "$ref": "#/$defs/version" }, "cspSchemaId" : { "description" : "ID of CSP Record Schema usd by the Response (see clause 5.2.4)", "$ref": "#/$defs/schemaId" }, + "cspSchemaVersion" : { + "description" : "the version number assigned by the CSP to the CSP Record Schema identified by the cspSchemaId (see clause 5.2.5)", + "$ref": "#/$defs/version" + }, "resultSetId": { "$ref": "#/$defs/resultSetId" }, @@ -46,8 +50,9 @@ }, "required": [ "etsiSchemaId", - "etsiVersion", + "etsiSpecificationVersion", "cspSchemaId", + "cspSchemaVersion", "resultSetId", "queryReference", "created" @@ -56,6 +61,10 @@ "schemaId": { "type": "string" }, + "version": { + "type" : "string", + "pattern" : "^[0-9]+\\.[0-9]+\\.[0-9]+$" + }, "resultSetId": { "type": "string" }, @@ -67,11 +76,11 @@ "title": "RecordSet", "description": "RecordSet (see clause 5.3). Contains a set of Records.", "items": { - "$ref": "#$defs/record" + "$ref": "#/$defs/record" } }, "record": { - "allOf" : [{ "$ref" : "etsi.org_ts103705_records#/$defs/record"}], + "allOf" : [{ "$ref" : "urn:etsi:li:ts103705_record_schema_id:0.3.0#/$defs/record"}], "type": "object", "title": "Record", "description": "Response record (see clause 5.3)", -- GitLab From fdadf91cf91f94f8bfb0d7810265f1c289ea8373 Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 31 May 2024 11:20:08 +0100 Subject: [PATCH 08/41] Updating descriptions from latest draft --- 103705/schema/etsi_types.schema.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index e328506..073539c 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -149,6 +149,7 @@ }, "CallPartyInformation": { "type": "object", + "description" : "Information about the participants and technologies related to the call", "properties": { "identity": { "$ref": "#/$defs/CallPartyId" @@ -175,6 +176,7 @@ }, "MessagingPartyInformation": { "type": "object", + "description": "Information about the participants and technologies related to the messages", "properties": { "identity": { "$ref": "#/$defs/MessagingPartyId" @@ -199,6 +201,7 @@ }, "EmailPartyInformation": { "type": "object", + "description": "Information about the participants and technologies related to the messages", "properties": { "identity": { "$ref": "#/$defs/EmailPartyId" @@ -223,6 +226,7 @@ }, "DataAccessPartyInformation": { "type": "object", + "description": "Information about the participants and technologies related to the data service", "properties": { "identity": { "$ref": "#/$defs/DataPartyId" @@ -247,6 +251,7 @@ }, "CallPartyId": { "type": "object", + "description": "Identifier of the party related to the call", "properties": { "mSISDN": { "$ref": "ts_103280_2017_07#/$defs/InternationalE164" @@ -270,6 +275,7 @@ }, "MessagingPartyId": { "type": "object", + "description": "Identifier of the party related to the message", "properties": { "mSISDN": { "$ref": "ts_103280_2017_07#/$defs/InternationalE164" @@ -293,6 +299,7 @@ }, "EmailPartyId": { "type": "object", + "description": "Identifier of the party related to the message", "properties": { "emailAddress": { "$ref": "ts_103280_2017_07#/$defs/EmailAddress" @@ -307,6 +314,7 @@ }, "DataAccessPartyId": { "type": "object", + "description": "Identifier of the party related to the data service", "properties": { "mSISDN": { "$ref": "ts_103280_2017_07#/$defs/InternationalE164" @@ -351,6 +359,7 @@ }, "DataVolume": { "type": "object", + "description": "quantification of the bytes exchanged", "properties": { "bytesUpload": { "type": "integer" @@ -365,6 +374,7 @@ }, "Bearer": { "type": "object", + "description": "The Technology used", "properties": { "technology": { "enum": [ @@ -383,6 +393,7 @@ }, "Location": { "type": "object", + "description": "Location information of the party", "properties": { "cGI": { "$ref": "ts_103280_2017_07#/$defs/CGI" -- GitLab From 75428cfa69b75db8341d9e7c0e469544f6054caf Mon Sep 17 00:00:00 2001 From: mark Date: Mon, 3 Jun 2024 16:39:19 +0100 Subject: [PATCH 09/41] Removing 'owner' --- 103705/examples/example1/csp_records.schema.json | 1 - 103705/examples/example2/csp_records.schema.json | 1 - 103705/examples/example3/csp_records.schema.json | 1 - 103705/examples/example4/csp_records.schema.json | 1 - 103705/schema/records.schema.json | 1 - 5 files changed, 5 deletions(-) diff --git a/103705/examples/example1/csp_records.schema.json b/103705/examples/example1/csp_records.schema.json index e4047ba..8668141 100644 --- a/103705/examples/example1/csp_records.schema.json +++ b/103705/examples/example1/csp_records.schema.json @@ -3,7 +3,6 @@ "$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)", - "owner" : "Example CSP", "cspSchemaID" : "csp.example_1", "dateIssued" : "2024-04-024T09:00:01Z", "version" : "1.1.1", diff --git a/103705/examples/example2/csp_records.schema.json b/103705/examples/example2/csp_records.schema.json index af09841..1cd1c89 100644 --- a/103705/examples/example2/csp_records.schema.json +++ b/103705/examples/example2/csp_records.schema.json @@ -3,7 +3,6 @@ "$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)", - "owner" : "Example CSP", "cspSchemaID" : "csp.example_2", "dateIssued" : "2024-04-024T09:00:01Z", "version" : "1.1.1", diff --git a/103705/examples/example3/csp_records.schema.json b/103705/examples/example3/csp_records.schema.json index c586b79..1194dc5 100644 --- a/103705/examples/example3/csp_records.schema.json +++ b/103705/examples/example3/csp_records.schema.json @@ -3,7 +3,6 @@ "$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)", - "owner" : "Example CSP", "cspSchemaID" : "csp.example_3", "dateIssued" : "2024-04-024T09:00:01Z", "version" : "1.1.1", diff --git a/103705/examples/example4/csp_records.schema.json b/103705/examples/example4/csp_records.schema.json index 66d9cf5..7503f36 100644 --- a/103705/examples/example4/csp_records.schema.json +++ b/103705/examples/example4/csp_records.schema.json @@ -3,7 +3,6 @@ "$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)", - "owner" : "Example CSP", "cspSchemaID" : "csp.example_4", "dateIssued" : "2024-04-024T09:00:01Z", "version" : "1.1.1", diff --git a/103705/schema/records.schema.json b/103705/schema/records.schema.json index 29d17ef..58ac74b 100644 --- a/103705/schema/records.schema.json +++ b/103705/schema/records.schema.json @@ -3,7 +3,6 @@ "$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)", - "owner" : "{replace with owner - see TS 103 705 Table 6.3}", "cspSchemaID" : "{replace with assigned ID - see TS 103 705 Table 6.2}", "dateIssued" : "{replace with date issued - see TS 103 705 Table 6.2}", "version" : "{Replace with version - see TS 103 705 Table 6.2}", -- GitLab From 318f81bd1b956cb729363bd476be58befa0cf7ad Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 20 Jun 2024 09:48:17 +0100 Subject: [PATCH 10/41] Adding schema support for signatures and skeleton example --- 103705/config.json | 11 +++++ .../examples/example5/csp_records.schema.json | 24 +++++++++ 103705/examples/example5/csp_results.json | 49 +++++++++++++++++++ 103705/examples/example5/description.txt | 6 +++ 103705/schema/response.schema.json | 17 +++++++ 5 files changed, 107 insertions(+) create mode 100644 103705/examples/example5/csp_records.schema.json create mode 100644 103705/examples/example5/csp_results.json create mode 100644 103705/examples/example5/description.txt diff --git a/103705/config.json b/103705/config.json index aaea455..6d4bac9 100644 --- a/103705/config.json +++ b/103705/config.json @@ -44,4 +44,15 @@ "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/example5/csp_records.schema.json b/103705/examples/example5/csp_records.schema.json new file mode 100644 index 0000000..b569878 --- /dev/null +++ b/103705/examples/example5/csp_records.schema.json @@ -0,0 +1,24 @@ +{ + "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", + "$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", + "dateIssued" : "2024-06-20 09:42:37", + "version" : "1.1.1", + "$defs": { + "record" : { + "oneOf" : [{ + "allOf" : [ + { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord"}}} + ]}, + { + "allOf" : [ + { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$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 0000000..2dda0fd --- /dev/null +++ b/103705/examples/example5/csp_results.json @@ -0,0 +1,49 @@ +{ + "recordSetDescription": { + "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", + "etsiSpecificationVersion": "0.3.0", + "cspSchemaId" : "csp.example_1", + "cspSchemaVersion" : "1.0.0", + "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", + "queryReference": "LDID", + "created": "2024-04-25T09:31:56.000000Z" + }, + "recordSet": [ + { + "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", + "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord", + "timeBegin": "2024-04-20T10:04:00.000000Z", + "timeEnd": "2024-04-20T10:05:00.000000Z", + "endReason": 16, + "parties": [ + { + "identity": {"mSISDN": "491713920067"}, + "role": "originating" + }, + { + "identity": {"mSISDN": "441632960123"}, + "role": "terminating" + } + ] + }, + { + "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", + "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord", + "timeBegin": "2024-04-18T10:04:00.000000Z", + "parties": [ + { + "identity": {"mSISDN": "441632960123"}, + "role": "sender" + }, + { + "identity": {"mSISDN": "491713920067"}, + "role": "receiver" + } + ] + } + ], + "signature" : { + "protected": "...", + "signature": "..." +} +} \ No newline at end of file diff --git a/103705/examples/example5/description.txt b/103705/examples/example5/description.txt new file mode 100644 index 0000000..1e567ac --- /dev/null +++ b/103705/examples/example5/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/schema/response.schema.json b/103705/schema/response.schema.json index 2ab1fbf..c9c2841 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -10,6 +10,9 @@ }, "recordSet": { "$ref": "#/$defs/recordSet" + }, + "signature": { + "$ref" : "#/$defs/Signature" } }, "required": [ @@ -99,6 +102,20 @@ "id", "type" ] + }, + "Signature": { + "properties": { + "protected": { + "type": "string" + }, + "signature": { + "type": "string" + } + }, + "required": [ + "protected", + "signature" + ] } } } \ No newline at end of file -- GitLab From 93780835cd2f102a3ba92c406647bfb9db0fda76 Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 20 Jun 2024 19:59:22 +0100 Subject: [PATCH 11/41] Removing Radius, Azimuth and StreetAddress to match latest draft --- 103705/schema/etsi_types.schema.json | 49 ---------------------------- 1 file changed, 49 deletions(-) diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index 073539c..5ebebb3 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -407,18 +407,9 @@ "modemMAC": { "$ref": "ts_103280_2017_07#/$defs/MACAddress" }, - "streetAddress": { - "$ref": "#/$defs/StreetAddress" - }, "coord": { "$ref": "ts_103280_2017_07#/$defs/WGS84CoordinateDecimal" }, - "radius": { - "$ref": "#/$defs/Radius" - }, - "azimuth": { - "$ref": "#/$defs/Azimuth" - }, "coordPolygon": { "type": "array", "items": { @@ -426,46 +417,6 @@ } } } - }, - "Radius": { - "type": "integer", - "minimum": 1, - "description": "Radius in meters // maybe move to TS 103 280" - }, - "Azimuth": { - "type": "integer", - "minimum": 0, - "exclusiveMaximum": 360, - "description": "Degrees; 0 = north, 90 = east // maybe move to TS 103 280" - }, - "StreetAddress": { - "type": "object", - "properties": { - "country": { - "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" - }, - "state": { - "type": "string" - }, - "province": { - "type": "string" - }, - "city": { - "type": "string" - }, - "street": { - "type": "string" - }, - "number": { - "type": "string" - }, - "numberExtension": { - "type": "string" - }, - "zip": { - "type": "string" - } - } } } } -- GitLab From 02bbba3fbb8e829e1b91970392562e6a94f6b4bb Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 20 Jun 2024 20:13:09 +0100 Subject: [PATCH 12/41] Adding signature example --- 103705/examples/example5/csp_results.json | 28 +++++++++++++++-------- 103705/schema/response.schema.json | 2 +- presigned.json | 1 + 3 files changed, 20 insertions(+), 11 deletions(-) create mode 100644 presigned.json diff --git a/103705/examples/example5/csp_results.json b/103705/examples/example5/csp_results.json index 2dda0fd..87cee5b 100644 --- a/103705/examples/example5/csp_results.json +++ b/103705/examples/example5/csp_results.json @@ -2,8 +2,8 @@ "recordSetDescription": { "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", "etsiSpecificationVersion": "0.3.0", - "cspSchemaId" : "csp.example_1", - "cspSchemaVersion" : "1.0.0", + "cspSchemaId": "csp.example_1", + "cspSchemaVersion": "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" @@ -17,11 +17,15 @@ "endReason": 16, "parties": [ { - "identity": {"mSISDN": "491713920067"}, + "identity": { + "mSISDN": "491713920067" + }, "role": "originating" }, { - "identity": {"mSISDN": "441632960123"}, + "identity": { + "mSISDN": "441632960123" + }, "role": "terminating" } ] @@ -32,18 +36,22 @@ "timeBegin": "2024-04-18T10:04:00.000000Z", "parties": [ { - "identity": {"mSISDN": "441632960123"}, + "identity": { + "mSISDN": "441632960123" + }, "role": "sender" }, { - "identity": {"mSISDN": "491713920067"}, + "identity": { + "mSISDN": "491713920067" + }, "role": "receiver" } ] } ], - "signature" : { - "protected": "...", - "signature": "..." -} + "Signature": { + "protected": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9", + "signature": "QI5I6VcMR4BkBWpcW4uoGclZJKTl8_iWr3VqLaYTyoQ" + } } \ No newline at end of file diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json index c9c2841..6a39681 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -11,7 +11,7 @@ "recordSet": { "$ref": "#/$defs/recordSet" }, - "signature": { + "Signature": { "$ref" : "#/$defs/Signature" } }, diff --git a/presigned.json b/presigned.json new file mode 100644 index 0000000..972ac20 --- /dev/null +++ b/presigned.json @@ -0,0 +1 @@ +{"recordSetDescription": {"etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", "etsiSpecificationVersion": "0.3.0", "cspSchemaId": "csp.example_1", "cspSchemaVersion": "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z"}, "recordSet": [{"id": "3da91ade-f526-4e55-b5da-0c8178f25c24", "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, "parties": [{"identity": {"mSISDN": "491713920067"}, "role": "originating"}, {"identity": {"mSISDN": "441632960123"}, "role": "terminating"}]}, {"id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord", "timeBegin": "2024-04-18T10:04:00.000000Z", "parties": [{"identity": {"mSISDN": "441632960123"}, "role": "sender"}, {"identity": {"mSISDN": "491713920067"}, "role": "receiver"}]}], "Signature": {"protected": "", "signature": ""}} \ No newline at end of file -- GitLab From 8e797e9884b74ca92ef59ba9debc181ab0a0942c Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 20 Jun 2024 20:13:29 +0100 Subject: [PATCH 13/41] Removing temp file --- presigned.json | 1 - 1 file changed, 1 deletion(-) delete mode 100644 presigned.json diff --git a/presigned.json b/presigned.json deleted file mode 100644 index 972ac20..0000000 --- a/presigned.json +++ /dev/null @@ -1 +0,0 @@ -{"recordSetDescription": {"etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", "etsiSpecificationVersion": "0.3.0", "cspSchemaId": "csp.example_1", "cspSchemaVersion": "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z"}, "recordSet": [{"id": "3da91ade-f526-4e55-b5da-0c8178f25c24", "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, "parties": [{"identity": {"mSISDN": "491713920067"}, "role": "originating"}, {"identity": {"mSISDN": "441632960123"}, "role": "terminating"}]}, {"id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord", "timeBegin": "2024-04-18T10:04:00.000000Z", "parties": [{"identity": {"mSISDN": "441632960123"}, "role": "sender"}, {"identity": {"mSISDN": "491713920067"}, "role": "receiver"}]}], "Signature": {"protected": "", "signature": ""}} \ No newline at end of file -- GitLab From 8938e8b775c7bd22ed8a024c82cb978a6a4c284e Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 25 Jun 2024 17:07:32 +0100 Subject: [PATCH 14/41] Fixing typo --- 103705/schema/response.schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json index 6a39681..a473533 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -30,11 +30,11 @@ "$ref": "#/$defs/schemaId" }, "etsiSpecificationVersion": { - "description" : "Version of ETSI TS 103 705 usd by the Response (see clause 5.2.3)", + "description" : "Version of ETSI TS 103 705 used by the Response (see clause 5.2.3)", "$ref": "#/$defs/version" }, "cspSchemaId" : { - "description" : "ID of CSP Record Schema usd by the Response (see clause 5.2.4)", + "description" : "ID of CSP Record Schema used by the Response (see clause 5.2.4)", "$ref": "#/$defs/schemaId" }, "cspSchemaVersion" : { -- GitLab From 16d6840787374e62ebb086f0b6c7a1dce55a0b62 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 25 Jun 2024 17:19:04 +0100 Subject: [PATCH 15/41] Updating schema ids --- 103705/examples/example1/csp_records.schema.json | 10 +++++----- 103705/examples/example1/csp_results.json | 6 +++--- 103705/examples/example2/csp_records.schema.json | 6 +++--- 103705/examples/example2/csp_results.json | 4 ++-- 103705/examples/example2/csp_types.schema.json | 2 +- 103705/examples/example3/csp_records.schema.json | 6 +++--- 103705/examples/example3/csp_results.json | 4 ++-- 103705/examples/example3/csp_types.schema.json | 2 +- 103705/examples/example4/csp_records.schema.json | 2 +- 103705/examples/example4/csp_results.json | 2 +- 103705/examples/example4/csp_types.schema.json | 8 ++++---- 103705/examples/example5/csp_records.schema.json | 10 +++++----- 103705/examples/example5/csp_results.json | 6 +++--- 103705/schema/etsi_types.schema.json | 2 +- 103705/schema/records.schema.json | 6 +++--- 103705/schema/response.schema.json | 4 ++-- 16 files changed, 40 insertions(+), 40 deletions(-) diff --git a/103705/examples/example1/csp_records.schema.json b/103705/examples/example1/csp_records.schema.json index 8668141..2b8349f 100644 --- a/103705/examples/example1/csp_records.schema.json +++ b/103705/examples/example1/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", + "$id": "urn:etsi:li:103705:record-schema-id:v1", "$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)", @@ -10,13 +10,13 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord"}}} + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord"}}} ]}, { "allOf" : [ - { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord"}}} + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord"}}} ]} ] } diff --git a/103705/examples/example1/csp_results.json b/103705/examples/example1/csp_results.json index 3fc4da3..007483b 100644 --- a/103705/examples/example1/csp_results.json +++ b/103705/examples/example1/csp_results.json @@ -1,6 +1,6 @@ { "recordSetDescription": { - "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", "etsiSpecificationVersion": "0.3.0", "cspSchemaId" : "csp.example_1", "cspSchemaVersion" : "1.0.0", @@ -11,7 +11,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord", + "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, @@ -28,7 +28,7 @@ }, { "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", - "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord", + "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord", "timeBegin": "2024-04-18T10:04:00.000000Z", "parties": [ { diff --git a/103705/examples/example2/csp_records.schema.json b/103705/examples/example2/csp_records.schema.json index 1cd1c89..f931a87 100644 --- a/103705/examples/example2/csp_records.schema.json +++ b/103705/examples/example2/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", + "$id": "urn:etsi:li:103705:record-schema-id:v1", "$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)", @@ -10,8 +10,8 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord"}}} + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord"}}} ]}, { "allOf" : [ diff --git a/103705/examples/example2/csp_results.json b/103705/examples/example2/csp_results.json index cdfe149..8ad9b31 100644 --- a/103705/examples/example2/csp_results.json +++ b/103705/examples/example2/csp_results.json @@ -1,6 +1,6 @@ { "recordSetDescription": { - "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", "etsiSpecificationVersion": "0.3.0", "cspSchemaId" : "csp.example_2", "cspSchemaVersion" : "1.0.0", @@ -11,7 +11,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord", + "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, diff --git a/103705/examples/example2/csp_types.schema.json b/103705/examples/example2/csp_types.schema.json index 7f2cca7..f00dd6f 100644 --- a/103705/examples/example2/csp_types.schema.json +++ b/103705/examples/example2/csp_types.schema.json @@ -5,7 +5,7 @@ "description": "JSON schema for ETSI-defined types (see clause 6.1 and Annex A)", "$defs": { "CSPMessagingRecord" : { - "allOf" : [{ "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord"}], + "allOf" : [{ "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord"}], "properties" : { "CSPMessagingReference" : { "$ref" : "ts_103280_2017_07#/$defs/UUID"} } diff --git a/103705/examples/example3/csp_records.schema.json b/103705/examples/example3/csp_records.schema.json index 1194dc5..235be50 100644 --- a/103705/examples/example3/csp_records.schema.json +++ b/103705/examples/example3/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", + "$id": "urn:etsi:li:103705:record-schema-id:v1", "$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)", @@ -10,8 +10,8 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord"}}} + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord"}}} ]}, { "allOf" : [ diff --git a/103705/examples/example3/csp_results.json b/103705/examples/example3/csp_results.json index a2fa1d7..09a9b50 100644 --- a/103705/examples/example3/csp_results.json +++ b/103705/examples/example3/csp_results.json @@ -1,6 +1,6 @@ { "recordSetDescription": { - "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", "etsiSpecificationVersion": "0.3.0", "cspSchemaId" : "csp.example_3", "cspSchemaVersion" : "1.0.0", @@ -11,7 +11,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord", + "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, diff --git a/103705/examples/example3/csp_types.schema.json b/103705/examples/example3/csp_types.schema.json index c54042c..a4da367 100644 --- a/103705/examples/example3/csp_types.schema.json +++ b/103705/examples/example3/csp_types.schema.json @@ -15,7 +15,7 @@ }, "dataVolumeUsed" : { "description" : "A data volume associated with this service record (using an ETSI TS 103 705 type) ", - "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/DataVolume" + "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/DataVolume" }, "numberOfService" : { "description" : "Some number associated with this service record (using a native JSON type)", diff --git a/103705/examples/example4/csp_records.schema.json b/103705/examples/example4/csp_records.schema.json index 7503f36..edbb103 100644 --- a/103705/examples/example4/csp_records.schema.json +++ b/103705/examples/example4/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", + "$id": "urn:etsi:li:103705:record-schema-id:v1", "$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)", diff --git a/103705/examples/example4/csp_results.json b/103705/examples/example4/csp_results.json index cf1c20a..4fcdb58 100644 --- a/103705/examples/example4/csp_results.json +++ b/103705/examples/example4/csp_results.json @@ -1,6 +1,6 @@ { "recordSetDescription": { - "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", "etsiSpecificationVersion": "0.3.0", "cspSchemaId" : "csp.example_4", "cspSchemaVersion" : "1.0.0", diff --git a/103705/examples/example4/csp_types.schema.json b/103705/examples/example4/csp_types.schema.json index d845c24..33fb9e3 100644 --- a/103705/examples/example4/csp_types.schema.json +++ b/103705/examples/example4/csp_types.schema.json @@ -15,19 +15,19 @@ }, "registeredAddress" : { "description" : "Points to the address registered as part of the service", - "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/Pointer" + "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/Pointer" }, "deliveryAddress" : { "description" : "Points to the address used for delivery", - "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/Pointer" + "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/Pointer" }, "billingAddress" : { "description" : "Points to the address used for billing", - "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/Pointer" + "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/Pointer" }, "contactAddress" : { "description" : "Points to the address used for mailing purposes", - "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/Pointer" + "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/Pointer" } } }, diff --git a/103705/examples/example5/csp_records.schema.json b/103705/examples/example5/csp_records.schema.json index b569878..763c0e9 100644 --- a/103705/examples/example5/csp_records.schema.json +++ b/103705/examples/example5/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", + "$id": "urn:etsi:li:103705:record-schema-id:v1", "$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)", @@ -10,13 +10,13 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord"}}} + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord"}}} ]}, { "allOf" : [ - { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord"}}} + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord"}}} ]} ] } diff --git a/103705/examples/example5/csp_results.json b/103705/examples/example5/csp_results.json index 87cee5b..28ca72e 100644 --- a/103705/examples/example5/csp_results.json +++ b/103705/examples/example5/csp_results.json @@ -1,6 +1,6 @@ { "recordSetDescription": { - "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", "etsiSpecificationVersion": "0.3.0", "cspSchemaId": "csp.example_1", "cspSchemaVersion": "1.0.0", @@ -11,7 +11,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord", + "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, @@ -32,7 +32,7 @@ }, { "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", - "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord", + "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord", "timeBegin": "2024-04-18T10:04:00.000000Z", "parties": [ { diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index 5ebebb3..144f8da 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:ts103705_type_schema_id:0.3.0", + "$id": "urn:etsi:li:103705:type-schema-id:v1", "$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)", diff --git a/103705/schema/records.schema.json b/103705/schema/records.schema.json index 58ac74b..c61f813 100644 --- a/103705/schema/records.schema.json +++ b/103705/schema/records.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", + "$id": "urn:etsi:li:103705:record-schema-id:v1", "$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)", @@ -12,8 +12,8 @@ { "$comment" : "This is an example", "allOf" : [ - { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord"}}} + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord"}}} ] } ] diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json index a473533..c8a1919 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:ts103705_schema_id:0.3.0", + "$id": "urn:etsi:li:103705:response-schema-id:v1", "$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 query (see clause 5)", @@ -83,7 +83,7 @@ } }, "record": { - "allOf" : [{ "$ref" : "urn:etsi:li:ts103705_record_schema_id:0.3.0#/$defs/record"}], + "allOf" : [{ "$ref" : "urn:etsi:li:103705:record-schema-id:v1#/$defs/record"}], "type": "object", "title": "Record", "description": "Response record (see clause 5.3)", -- GitLab From a10e099753d864e2441d3a4e19be51acaede4e22 Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 5 Jul 2024 08:48:11 +0100 Subject: [PATCH 16/41] Updating schema post NL meeting --- 103705/examples/example1/csp_results.json | 6 +-- 103705/examples/example2/csp_results.json | 6 +-- 103705/examples/example3/csp_results.json | 4 +- 103705/examples/example5/csp_results.json | 58 +---------------------- 103705/examples/example5/description.txt | 2 +- 103705/schema/etsi_types.schema.json | 18 ++++--- 6 files changed, 18 insertions(+), 76 deletions(-) diff --git a/103705/examples/example1/csp_results.json b/103705/examples/example1/csp_results.json index 007483b..55bce43 100644 --- a/103705/examples/example1/csp_results.json +++ b/103705/examples/example1/csp_results.json @@ -17,11 +17,11 @@ "endReason": 16, "parties": [ { - "identity": {"mSISDN": "491713920067"}, + "identity": {"phoneNumber": "491713920067"}, "role": "originating" }, { - "identity": {"mSISDN": "441632960123"}, + "identity": {"phoneNumber": "441632960123"}, "role": "terminating" } ] @@ -29,7 +29,7 @@ { "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord", - "timeBegin": "2024-04-18T10:04:00.000000Z", + "eventTime": "2024-04-18T10:04:00.000000Z", "parties": [ { "identity": {"mSISDN": "441632960123"}, diff --git a/103705/examples/example2/csp_results.json b/103705/examples/example2/csp_results.json index 8ad9b31..088c60d 100644 --- a/103705/examples/example2/csp_results.json +++ b/103705/examples/example2/csp_results.json @@ -17,11 +17,11 @@ "endReason": 16, "parties": [ { - "identity": {"mSISDN": "491713920067"}, + "identity": {"phoneNumber": "491713920067"}, "role": "originating" }, { - "identity": {"mSISDN": "441632960123"}, + "identity": {"phoneNumber": "441632960123"}, "role": "terminating" } ] @@ -29,7 +29,7 @@ { "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", "type": "csp_example_types#/$defs/CSPMessagingRecord", - "timeBegin": "2024-04-18T10:04:00.000000Z", + "eventTime": "2024-04-18T10:04:00.000000Z", "parties": [ { "identity": {"mSISDN": "441632960123"}, diff --git a/103705/examples/example3/csp_results.json b/103705/examples/example3/csp_results.json index 09a9b50..9ba1073 100644 --- a/103705/examples/example3/csp_results.json +++ b/103705/examples/example3/csp_results.json @@ -17,11 +17,11 @@ "endReason": 16, "parties": [ { - "identity": {"mSISDN": "491713920067"}, + "identity": {"phoneNumber": "491713920067"}, "role": "originating" }, { - "identity": {"mSISDN": "441632960123"}, + "identity": {"phoneNumber": "441632960123"}, "role": "terminating" } ] diff --git a/103705/examples/example5/csp_results.json b/103705/examples/example5/csp_results.json index 28ca72e..532105f 100644 --- a/103705/examples/example5/csp_results.json +++ b/103705/examples/example5/csp_results.json @@ -1,57 +1 @@ -{ - "recordSetDescription": { - "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", - "etsiSpecificationVersion": "0.3.0", - "cspSchemaId": "csp.example_1", - "cspSchemaVersion": "1.0.0", - "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", - "queryReference": "LDID", - "created": "2024-04-25T09:31:56.000000Z" - }, - "recordSet": [ - { - "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord", - "timeBegin": "2024-04-20T10:04:00.000000Z", - "timeEnd": "2024-04-20T10:05:00.000000Z", - "endReason": 16, - "parties": [ - { - "identity": { - "mSISDN": "491713920067" - }, - "role": "originating" - }, - { - "identity": { - "mSISDN": "441632960123" - }, - "role": "terminating" - } - ] - }, - { - "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", - "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord", - "timeBegin": "2024-04-18T10:04:00.000000Z", - "parties": [ - { - "identity": { - "mSISDN": "441632960123" - }, - "role": "sender" - }, - { - "identity": { - "mSISDN": "491713920067" - }, - "role": "receiver" - } - ] - } - ], - "Signature": { - "protected": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9", - "signature": "QI5I6VcMR4BkBWpcW4uoGclZJKTl8_iWr3VqLaYTyoQ" - } -} \ No newline at end of file +{"recordSetDescription": {"etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", "etsiSpecificationVersion": "0.3.0", "cspSchemaId": "csp.example_1", "cspSchemaVersion": "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z"}, "recordSet": [{"id": "3da91ade-f526-4e55-b5da-0c8178f25c24", "type": "urn:etsi:li:103705:type-schema-id:v1#/$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#/$defs/MessagingRecord", "eventTime": "2024-04-18T10:04:00.000000Z", "parties": [{"identity": {"mSISDN": "441632960123"}, "role": "sender"}, {"identity": {"mSISDN": "491713920067"}, "role": "receiver"}]}], "Signature": {"protected": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9", "signature": "yvPyjRDAS7dSld9inyVfLpz02En47_AMq0J8cP82BCU"}} diff --git a/103705/examples/example5/description.txt b/103705/examples/example5/description.txt index 1e567ac..9e8da6b 100644 --- a/103705/examples/example5/description.txt +++ b/103705/examples/example5/description.txt @@ -1,4 +1,4 @@ -CSP elects to use only ETSI-standard types in their responses +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 diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index 144f8da..e15301e 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -29,7 +29,7 @@ "title": "Information about call details", "description": "Details about a record or event related to a call", "required": [ - "timeBegin" + "timeBegin", "parties" ], "properties": { "sessionRefId": { @@ -61,10 +61,6 @@ "endReason": { "type": "integer", "description": "ITU Q.850" - }, - "bearer": { - "$ref": "#/$defs/Bearer", - "description": "In case one set of bearer information is availble" } } }, @@ -73,7 +69,7 @@ "title": "Information about messaging details", "description": "Details about a record or event related to a message", "required": [ - "timeBegin" + "eventTime", "parties" ], "properties": { "sessionRefId": { @@ -97,7 +93,7 @@ "title": "Information about email details", "description": "Details about a record or event related to an email", "required": [ - "timeBegin" + "eventTime", "parties" ], "properties": { "sessionRefId": { @@ -121,7 +117,7 @@ "title": "Data Record", "description": "Information about a data access session (e.g. a mobile data session)", "required": [ - "timeBegin" + "timeBegin", "parties" ], "properties": { "sessionRefId": { @@ -253,7 +249,7 @@ "type": "object", "description": "Identifier of the party related to the call", "properties": { - "mSISDN": { + "phoneNumber": { "$ref": "ts_103280_2017_07#/$defs/InternationalE164" }, "iMSI": { @@ -384,7 +380,9 @@ "5G", "fiber", "cable", - "wifi" + "wifi", + "xDSL", + "pstn" ], "description": "The technology used;" } -- GitLab From 7e491f056c5146c1a1cd348041849e90ee43f051 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 24 Apr 2024 10:24:14 +0100 Subject: [PATCH 17/41] Rebasing previous draft branch --- 103705/examples/csp_a.schema.json | 64 ++++++++++++++++++ 103705/examples/csp_a_results.json | 22 +++++++ 103705/generate_docs.py | 2 + 103705/schema/etsi_types.schema.json | 82 +++++++++++++++++++++++ 103705/schema/response.schema.json | 77 ++++++++++++++++++++++ 103705/validate.py | 95 +++++++++++++++++++++++++++ 103705/validation/validate_705.py | 97 ++++++++++++++++++++++++++++ 7 files changed, 439 insertions(+) create mode 100644 103705/examples/csp_a.schema.json create mode 100644 103705/examples/csp_a_results.json create mode 100644 103705/generate_docs.py create mode 100644 103705/schema/etsi_types.schema.json create mode 100644 103705/schema/response.schema.json create mode 100644 103705/validate.py create mode 100644 103705/validation/validate_705.py diff --git a/103705/examples/csp_a.schema.json b/103705/examples/csp_a.schema.json new file mode 100644 index 0000000..febb70a --- /dev/null +++ b/103705/examples/csp_a.schema.json @@ -0,0 +1,64 @@ +{ + "$id": "example.com_csp-a-schema_1.2.3", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "Example extended schema for CSP A. This CSP only ever has one person associated with a subscription - the account holder - and so composes a Subscription record from the ETSI-standard Subscription and PersonDetails entities", + "allOf": [ + { + "$ref": "http://etsi.org/temp/705" + }, + { + "type": "object", + "properties": { + "recordSet": { + "type": "array", + "items": { + "$ref": "#/$defs/definedRecords" + } + } + }, + "required": [ + "recordSet" + ] + } + ], + "$defs": { + "definedRecords": { + "title" : "Defined Records", + "description" : "Sets out what the valid set of Record types is for this CSP. It is expressed as a 'oneOf' list, each of which combines a type identifier and a reference to the type that is used to validate the record", + "oneOf": [ + { + "allOf": [ + { + "type": "object", + "title" : "Subscriber record", + "description" : "Uses the ETSI-standard subscriber record (the first $ref), extended to include person details (the second $ref)", + "properties": { + "type": { + "const": "Subscription" + } + } + }, + { + "description" : "Uses the basic ETSI-standard subscriber record fields as a base", + "$ref": "http://etsi.org/temp/705/entities#/$defs/Subscription" + }, + { + "description" : "Extends the basic ETSI standard subscriber record according to the definition in extendedSubscriberRecord", + "$ref": "#/$defs/extendedSubscriberRecord" + } + ] + } + ] + }, + "extendedSubscriberRecord" : { + "title" : "Extended Subscriber Record", + "description" : "Here CSP A can describe all the extra fields that they want to put in their subscriber record. In this case, they just add the details of the account holder using the ETSI-standard PersonDetails type", + "properties" : { + "title" : "Account Holder", + "description" : "Name and date of birth of the account holder for the description", + "accountHolder" : { "$ref" : "http://etsi.org/temp/705/entities#/$defs/PersonDetails"} + }, + "required" : ["personDetails"] + } + } +} \ No newline at end of file diff --git a/103705/examples/csp_a_results.json b/103705/examples/csp_a_results.json new file mode 100644 index 0000000..e142485 --- /dev/null +++ b/103705/examples/csp_a_results.json @@ -0,0 +1,22 @@ +{ + "recordSetDescription" : { + "schemaId" : "etsi.org/ts_103_705/1.1.1", + "resultSetId" : "788e190d-fb2e-416e-9798-12a66ebe0a1a", + "queryReference" : "LDID_1", + "created" : "2023-06-08T09:31:56.000000Z", + "recordTypes" : { + "Subscription" : "example.com_csp-a-schema_1.2.3#$defs/extendedSubscriberRecord" + } + }, + "recordSet" : [ + { + "id" : "1e997322-b813-437b-b2e2-dae732f0cf7f", + "type" : "Subscription", + "subscriptionId" : "{unique CSP subscription ID}", + "personDetails" : { + "lastName" : "Last", + "firstName" : "First" + } + } + ] +} \ No newline at end of file diff --git a/103705/generate_docs.py b/103705/generate_docs.py new file mode 100644 index 0000000..8837e1f --- /dev/null +++ b/103705/generate_docs.py @@ -0,0 +1,2 @@ +import json +from pathlib import Path diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json new file mode 100644 index 0000000..34e34a7 --- /dev/null +++ b/103705/schema/etsi_types.schema.json @@ -0,0 +1,82 @@ +{ + "$id": "etsi.org_ts103705_1.3.1_etsi-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": { + "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 should be indicated by the CSP schema" + }, + "required" : ["destination"] + } + }, + "Subscription": { + "type": "object", + "title": "Subscription", + "description": "Basic subscription record", + "properties": { + "subscriptionId": { + "title" : "Subscription Identifier", + "description" : "Unique identifier for a subscription within the CSP", + "type": "string" + }, + "startDate": { + "title" : "Subscription Start Date", + "description" : "Date that the subscription started", + "$ref": "ts_103280_2017_07#/$defs/UTCDateTime" + }, + "endDate": { + "title" : "Subscription End Date", + "description" : "Date that the subscription ended", + "$ref": "ts_103280_2017_07#/$defs/UTCDateTime" + } + }, + "required" : ["subscriptionId"] + }, + "PersonDetails": { + "type": "object", + "title": "Person Details", + "description": "Details about a person", + "properties": { + "forename": { + "title" : "Forename", + "description" : "Forename(s)", + "type": "string" + }, + "middeName": { + "title" : "First Name", + "description" : "Middle name(s), given as a space-delimited string", + "type": "string" + }, + "lastName" : { + "title" : "Family Name", + "description" : "Family name(s)", + "type" : "string" + }, + "birthDate" : { + "title" : "Date of Birth", + "description" : "Date of birth (time part can be ignored)", + "$ref" : "ts_103280_2017_07#/$defs/DateTime" + }, + "gender" : { + "title" : "Gender", + "description" : "Gender of the person", + "type" : "string" + } + }, + "required" : ["lastName"] + } + } +} \ 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 0000000..57e0e12 --- /dev/null +++ b/103705/schema/response.schema.json @@ -0,0 +1,77 @@ +{ + "$id": "etsi.org_ts103705_1.3.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 query (see clause 5)", + "type:": "object", + "properties": { + "recordSetDescription": { + "$ref": "#/$defs/recordSetDescription" + }, + "recordSet": { + "$ref": "#/$defs/recordSet" + } + }, + "required": [ + "recordSetDescription", + "recordSet" + ], + "$defs": { + "recordSetDescription": { + "type": "object", + "title": "RecordSetDescription", + "description": "Provides metadata about the records being delivered (see clause 5.2)", + "properties": { + "schemaId" : { "$ref" : "#/$defs/schemaId" }, + "resultSetId" : { "$ref" : "#/$defs/resultSetId"}, + "queryReference" : { "$ref" : "#/$defs/queryReference" }, + "created" : {"$ref" : "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime"}, + "recordTypes" : {"$ref" : "#/$defs/recordTypes"} + }, + "required": [ + "schemaId", "resultSetId", "queryReference", "created", "recordTypes" + ] + }, + "schemaId": { + "type": "string" + }, + "resultSetId": { + "type": "string" + }, + "queryReference": { + "type": "string" + }, + "recordSet": { + "type": "array", + "title": "RecordSet", + "description": "RecordSet (see clause 5.3). Contains a set of Records.", + "items": { + "$ref": "#$defs/record" + } + }, + "recordTypes" : { + "type" : "object", + "title" : "RecordTypes", + "description" : "Dictionary of types used by the Response document (see clause 5.2.6)" + }, + "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" : "Type identifier, shall be mapped to a schema reference via the recrdTypes map (see clauses 5.2.6 and 5.3.3)" + } + }, + "required": [ + "id", "type" + ] + } + } +} \ No newline at end of file diff --git a/103705/validate.py b/103705/validate.py new file mode 100644 index 0000000..fa54909 --- /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 0000000..bb6913d --- /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 -- GitLab From 4683bd8f01cc8f6feae9758335ad3c85742c8d6f Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 30 Apr 2024 10:20:23 +0100 Subject: [PATCH 18/41] Adding more examples --- 103705/config.json | 35 + 103705/examples/csp_a.schema.json | 64 -- 103705/examples/csp_a_results.json | 22 - .../examples/example1/csp_records.schema.json | 25 + 103705/examples/example1/csp_results.json | 42 ++ 103705/examples/example1/description.txt | 6 + .../examples/example2/csp_records.schema.json | 25 + 103705/examples/example2/csp_results.json | 43 ++ .../examples/example2/csp_types.schema.json | 14 + 103705/examples/example2/description.txt | 8 + .../examples/example3/csp_records.schema.json | 25 + 103705/examples/example3/csp_results.json | 34 + .../examples/example3/csp_types.schema.json | 38 + 103705/examples/example3/description.txt | 8 + 103705/questions.txt | 49 ++ 103705/schema/etsi_types.schema.json | 657 ++++++++++++++++-- 103705/schema/records.schema.json | 23 + 103705/schema/response.schema.json | 41 +- 18 files changed, 1003 insertions(+), 156 deletions(-) create mode 100644 103705/config.json delete mode 100644 103705/examples/csp_a.schema.json delete mode 100644 103705/examples/csp_a_results.json create mode 100644 103705/examples/example1/csp_records.schema.json create mode 100644 103705/examples/example1/csp_results.json create mode 100644 103705/examples/example1/description.txt create mode 100644 103705/examples/example2/csp_records.schema.json create mode 100644 103705/examples/example2/csp_results.json create mode 100644 103705/examples/example2/csp_types.schema.json create mode 100644 103705/examples/example2/description.txt create mode 100644 103705/examples/example3/csp_records.schema.json create mode 100644 103705/examples/example3/csp_results.json create mode 100644 103705/examples/example3/csp_types.schema.json create mode 100644 103705/examples/example3/description.txt create mode 100644 103705/questions.txt create mode 100644 103705/schema/records.schema.json diff --git a/103705/config.json b/103705/config.json new file mode 100644 index 0000000..a7a6484 --- /dev/null +++ b/103705/config.json @@ -0,0 +1,35 @@ +[{ + "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" + ] +}] \ No newline at end of file diff --git a/103705/examples/csp_a.schema.json b/103705/examples/csp_a.schema.json deleted file mode 100644 index febb70a..0000000 --- a/103705/examples/csp_a.schema.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$id": "example.com_csp-a-schema_1.2.3", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "Example extended schema for CSP A. This CSP only ever has one person associated with a subscription - the account holder - and so composes a Subscription record from the ETSI-standard Subscription and PersonDetails entities", - "allOf": [ - { - "$ref": "http://etsi.org/temp/705" - }, - { - "type": "object", - "properties": { - "recordSet": { - "type": "array", - "items": { - "$ref": "#/$defs/definedRecords" - } - } - }, - "required": [ - "recordSet" - ] - } - ], - "$defs": { - "definedRecords": { - "title" : "Defined Records", - "description" : "Sets out what the valid set of Record types is for this CSP. It is expressed as a 'oneOf' list, each of which combines a type identifier and a reference to the type that is used to validate the record", - "oneOf": [ - { - "allOf": [ - { - "type": "object", - "title" : "Subscriber record", - "description" : "Uses the ETSI-standard subscriber record (the first $ref), extended to include person details (the second $ref)", - "properties": { - "type": { - "const": "Subscription" - } - } - }, - { - "description" : "Uses the basic ETSI-standard subscriber record fields as a base", - "$ref": "http://etsi.org/temp/705/entities#/$defs/Subscription" - }, - { - "description" : "Extends the basic ETSI standard subscriber record according to the definition in extendedSubscriberRecord", - "$ref": "#/$defs/extendedSubscriberRecord" - } - ] - } - ] - }, - "extendedSubscriberRecord" : { - "title" : "Extended Subscriber Record", - "description" : "Here CSP A can describe all the extra fields that they want to put in their subscriber record. In this case, they just add the details of the account holder using the ETSI-standard PersonDetails type", - "properties" : { - "title" : "Account Holder", - "description" : "Name and date of birth of the account holder for the description", - "accountHolder" : { "$ref" : "http://etsi.org/temp/705/entities#/$defs/PersonDetails"} - }, - "required" : ["personDetails"] - } - } -} \ No newline at end of file diff --git a/103705/examples/csp_a_results.json b/103705/examples/csp_a_results.json deleted file mode 100644 index e142485..0000000 --- a/103705/examples/csp_a_results.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "recordSetDescription" : { - "schemaId" : "etsi.org/ts_103_705/1.1.1", - "resultSetId" : "788e190d-fb2e-416e-9798-12a66ebe0a1a", - "queryReference" : "LDID_1", - "created" : "2023-06-08T09:31:56.000000Z", - "recordTypes" : { - "Subscription" : "example.com_csp-a-schema_1.2.3#$defs/extendedSubscriberRecord" - } - }, - "recordSet" : [ - { - "id" : "1e997322-b813-437b-b2e2-dae732f0cf7f", - "type" : "Subscription", - "subscriptionId" : "{unique CSP subscription ID}", - "personDetails" : { - "lastName" : "Last", - "firstName" : "First" - } - } - ] -} \ 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 0000000..08ccf9f --- /dev/null +++ b/103705/examples/example1/csp_records.schema.json @@ -0,0 +1,25 @@ +{ + "$id": "etsi.org_ts103705_records", + "$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)", + "owner" : "Example CSP", + "cspSchemaID" : "csp.example_1", + "dateIssued" : "2024-04-024T09:00:01Z", + "version" : "1.1.1", + "$defs": { + "record" : { + "oneOf" : [{ + "allOf" : [ + { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall" }, + { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall"}}} + ]}, + { + "allOf" : [ + { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationMessaging" }, + { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationMessaging"}}} + ]} + ] + } + } +} \ 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 0000000..eb31016 --- /dev/null +++ b/103705/examples/example1/csp_results.json @@ -0,0 +1,42 @@ +{ + "recordSetDescription": { + "schemaId": "etsi.org/ts_103_705/1.1.1", + "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", + "queryReference": "LDID", + "created": "2024-04-25T09:31:56.000000Z" + }, + "recordSet": [ + { + "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", + "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall", + "timeBegin": "2024-04-20T10:04:00.000000Z", + "timeEnd": "2024-04-20T10:05:00.000000Z", + "endReason": 16, + "parties": [ + { + "identity": {"mSISDN": "491713920067"}, + "role": "originating" + }, + { + "identity": {"mSISDN": "441632960123"}, + "role": "terminating" + } + ] + }, + { + "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", + "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationMessaging", + "timeBegin": "2024-04-18T10:04:00.000000Z", + "parties": [ + { + "identity": {"mSISDN": "441632960123"}, + "role": "sender" + }, + { + "identity": {"mSISDN": "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 0000000..1e567ac --- /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 0000000..774cb7d --- /dev/null +++ b/103705/examples/example2/csp_records.schema.json @@ -0,0 +1,25 @@ +{ + "$id": "etsi.org_ts103705_records", + "$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)", + "owner" : "Example CSP", + "cspSchemaID" : "csp.example_2", + "dateIssued" : "2024-04-024T09:00:01Z", + "version" : "1.1.1", + "$defs": { + "record" : { + "oneOf" : [{ + "allOf" : [ + { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall" }, + { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall"}}} + ]}, + { + "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 0000000..14a0804 --- /dev/null +++ b/103705/examples/example2/csp_results.json @@ -0,0 +1,43 @@ +{ + "recordSetDescription": { + "schemaId": "etsi.org/ts_103_705/1.1.1", + "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", + "queryReference": "LDID", + "created": "2024-04-25T09:31:56.000000Z" + }, + "recordSet": [ + { + "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", + "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall", + "timeBegin": "2024-04-20T10:04:00.000000Z", + "timeEnd": "2024-04-20T10:05:00.000000Z", + "endReason": 16, + "parties": [ + { + "identity": {"mSISDN": "491713920067"}, + "role": "originating" + }, + { + "identity": {"mSISDN": "441632960123"}, + "role": "terminating" + } + ] + }, + { + "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", + "type": "csp_example_types#/$defs/CSPMessagingRecord", + "timeBegin": "2024-04-18T10:04:00.000000Z", + "parties": [ + { + "identity": {"mSISDN": "441632960123"}, + "role": "sender" + }, + { + "identity": {"mSISDN": "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 0000000..d0d04d8 --- /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" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationMessaging"}], + "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 0000000..1b22fdf --- /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 0000000..6550acb --- /dev/null +++ b/103705/examples/example3/csp_records.schema.json @@ -0,0 +1,25 @@ +{ + "$id": "etsi.org_ts103705_records", + "$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)", + "owner" : "Example CSP", + "cspSchemaID" : "csp.example_3", + "dateIssued" : "2024-04-024T09:00:01Z", + "version" : "1.1.1", + "$defs": { + "record" : { + "oneOf" : [{ + "allOf" : [ + { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall" }, + { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall"}}} + ]}, + { + "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 0000000..4f88e97 --- /dev/null +++ b/103705/examples/example3/csp_results.json @@ -0,0 +1,34 @@ +{ + "recordSetDescription": { + "schemaId": "etsi.org/ts_103_705/1.1.1", + "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", + "queryReference": "LDID", + "created": "2024-04-25T09:31:56.000000Z" + }, + "recordSet": [ + { + "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", + "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall", + "timeBegin": "2024-04-20T10:04:00.000000Z", + "timeEnd": "2024-04-20T10:05:00.000000Z", + "endReason": 16, + "parties": [ + { + "identity": {"mSISDN": "491713920067"}, + "role": "originating" + }, + { + "identity": {"mSISDN": "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 0000000..0299c7d --- /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" : "etsi.org_ts103705_1.3.1_etsi-types#/$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 0000000..a72d3ca --- /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/questions.txt b/103705/questions.txt new file mode 100644 index 0000000..58a8805 --- /dev/null +++ b/103705/questions.txt @@ -0,0 +1,49 @@ +----- + +CSP wants to use completely standard records + +CSP wants to use a mix of standard records and extended ones + +CSP wants to use a completely novel type of record + +CSP wants self-contained records (non-normalised) + +CSP wants normalised pointer records (requires extension) + +----- + +(Also consider our extensions i.e. version management) +(Also consider allocating a urn for our schema namespaces) + +Wondering whether title + description really adds anything. Maybe only need description? + +Also need descriptions in with ref (description of field is different to description of type) + +----- + +Lots of overlap in e.g. messaging / call. Could we factor out common bits and use allOf constraint? + +Subtle problem with "oneOf" constraint +e.g. InformationCall and InformationMessaging validate nearly the same documents +(so e.g using "originating" and "terminating" in PartyMessaging works just fine - even though it shouldn't) +More seriously - if you only use fields common to both, "oneOf" fails because the instance document can match multiple. +Could solve both of these by setting the "type" to a constant (but maintenance overhead) +BUT this would cause issues with using allOf to extend things +Maybe factor out record from type? i.e. CallRecord = CallInformation + type = blah +OR make that part of the convention when importing in the record schema (i.e a record definition has +to include a allOf (type) + type (const) declaration) + +Q.850 end reason +- Is this always valid (i.e. non-PSTN call)? Or is it the other way round (provide it if you have one, don't if you don't) +- Can it be more constrained (it's a 7-bit field and 0 isn't valid, so 1-127?) + +InformationMessaging +- does "timeBegin" and "timeEnd" make sense if this is a single messaging event? +- descriptions should ideally describe meaning as well as format (i.e. not just talking about trailing zeroes) + +----- + +JSON test issues +- globbing dirs from config file breaks +- RefResolutionError raises exception into calling process rather than a BuildError (sort of fixed now) +- RefResolution wasn't extended to all supporting schemas (now is, but all lumped under main file - fix) diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index 34e34a7..4179e44 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -4,79 +4,630 @@ "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)" + "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 should be indicated by the CSP schema" + "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"] + "required": [ + "destination" + ] } }, - "Subscription": { + "InformationCall": { "type": "object", - "title": "Subscription", - "description": "Basic subscription record", + "title": "Information about call details", + "description": "Details about a record or event related to a call", + "required": [ + "timeBegin" + ], "properties": { - "subscriptionId": { - "title" : "Subscription Identifier", - "description" : "Unique identifier for a subscription within the CSP", + "sessionRefId": { + "type": "string", + "description": "A reference identifier to uniquely identify the telephony call" + }, + "timeBegin": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "timeEnd": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "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/PartyInformationCall" + } + }, + "endReason": { + "type": "integer", + "description": "ITU Q.850" + }, + "bearer": { + "$ref": "#/$defs/Bearer", + "description": "In case one set of bearer information is availble" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "InformationMessaging": { + "type": "object", + "title": "Information about messaging details", + "description": "Details about a record or event related to a message", + "required": [ + "timeBegin" + ], + "properties": { + "sessionRefId": { + "type": "string", + "description": "A reference identifier to uniquely identify the message" + }, + "timeBegin": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "timeEnd": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "parties": { + "type": "array", + "items": { + "$ref": "#/$defs/PartyInformationMessaging" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "InformationEmail": { + "type": "object", + "title": "Information about email details", + "description": "Details about a record or event related to an email", + "required": [ + "timeBegin" + ], + "properties": { + "sessionRefId": { + "type": "string", + "description": "A reference identifier to uniquely identify the message" + }, + "timeBegin": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "timeEnd": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "parties": { + "type": "array", + "items": { + "$ref": "#/$defs/PartyInformationEmail" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "InformationChat": { + "type": "object", + "title": "Information about chat details", + "description": "Details about a record or event related to a chat", + "required": [ + "timeBegin" + ], + "properties": { + "sessionRefId": { + "type": "string", + "description": "A reference identifier to uniquely identify the message" + }, + "timeBegin": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "timeEnd": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "parties": { + "type": "array", + "items": { + "$ref": "#/$defs/PartyInformationChat" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "InformationData": { + "type": "object", + "title": "Information about email details", + "description": "Details about a record or event related to an email", + "required": [ + "timeBegin" + ], + "properties": { + "sessionRefId": { + "type": "string", + "description": "A reference identifier to uniquely identify the message" + }, + "timeBegin": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "timeEnd": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "parties": { + "type": "array", + "items": { + "$ref": "#/$defs/PartyInformationEmail" + } + }, + "volume": { + "$ref": "#/$defs/DataVolume" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "InformationOther": { + "type": "object", + "title": "Information about other details", + "description": "Details about a record or event which can not by fitted in any of the above structures", + "required": [ + "timeBegin" + ], + "properties": { + "sessionRefId": { + "type": "string", + "description": "A reference identifier to uniquely identify the message" + }, + "timeBegin": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "timeEnd": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", + "description": "Unknown fractions of the time to be filled-in with zeros" + }, + "parties": { + "type": "array", + "items": { + "$ref": "#/$defs/PartyInformationOther" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyInformationCall": { + "type": "object", + "properties": { + "identity": { + "$ref": "#/$defs/PartyIdCall" + }, + "role": { + "enum": [ + "originating", + "terminating", + "forwarding", + "unknown" + ] + }, + "bearer": { + "$ref": "#/$defs/Bearer", + "description": "For bearer information specific for this party" + }, + "locations": { + "type": "array", + "items": { + "$ref": "#/$defs/Location" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyInformationMessaging": { + "type": "object", + "properties": { + "identity": { + "$ref": "#/$defs/PartyIdMessaging" + }, + "role": { + "enum": [ + "sender", + "receiver" + ] + }, + "bearer": { + "$ref": "#/$defs/Bearer", + "description": "For bearer information specific for this party" + }, + "locations": { + "type": "array", + "items": { + "$ref": "#/$defs/Location" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyInformationEmail": { + "type": "object", + "properties": { + "identity": { + "$ref": "#/$defs/PartyIdEmail" + }, + "role": { + "enum": [ + "sender", + "receiver" + ] + }, + "bearer": { + "$ref": "#/$defs/Bearer", + "description": "For bearer information specific for this party" + }, + "locations": { + "type": "array", + "items": { + "$ref": "#/$defs/Location" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyInformationChat": { + "type": "object", + "properties": { + "identity": { + "$ref": "#/$defs/PartyIdChat" + }, + "bearer": { + "$ref": "#/$defs/Bearer", + "description": "For bearer information specific for this party" + }, + "locations": { + "type": "array", + "items": { + "$ref": "#/$defs/Location" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyInformationData": { + "type": "object", + "properties": { + "identity": { + "$ref": "#/$defs/PartyIdData" + }, + "aPN": { + "type": "string" + }, + "dNN": { "type": "string" }, - "startDate": { - "title" : "Subscription Start Date", - "description" : "Date that the subscription started", - "$ref": "ts_103280_2017_07#/$defs/UTCDateTime" + "bearer": { + "$ref": "#/$defs/Bearer", + "description": "For bearer information specific for this party" }, - "endDate": { - "title" : "Subscription End Date", - "description" : "Date that the subscription ended", - "$ref": "ts_103280_2017_07#/$defs/UTCDateTime" + "locations": { + "type": "array", + "items": { + "$ref": "#/$defs/Location" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" } - }, - "required" : ["subscriptionId"] + } }, - "PersonDetails": { + "PartyInformationOther": { "type": "object", - "title": "Person Details", - "description": "Details about a person", "properties": { - "forename": { - "title" : "Forename", - "description" : "Forename(s)", + "identity": { + "$ref": "#/$defs/PartyIdOther" + }, + "bearer": { + "$ref": "#/$defs/Bearer", + "description": "For bearer information specific for this party" + }, + "locations": { + "type": "array", + "items": { + "$ref": "#/$defs/Location" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyIdCall": { + "type": "object", + "properties": { + "mSISDN": { + "$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" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyIdMessaging": { + "type": "object", + "properties": { + "mSISDN": { + "$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" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyIdEmail": { + "type": "object", + "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" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyIdChat": { + "type": "object", + "properties": { + "ServiceAccessIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/ServiceAccessIdentifier" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyIdData": { + "type": "object", + "properties": { + "mSISDN": { + "$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" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "PartyIdOther": { + "type": "object", + "properties": { + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "// ==== Leaf data types ====": {}, + "DataVolume": { + "type": "object", + "properties": { + "bytesUpload": { + "type": "integer" + }, + "bytesDownload": { + "type": "integer" + }, + "bytesTotal": { + "type": "integer" + } + } + }, + "Bearer": { + "type": "object", + "properties": { + "technology": { + "enum": [ + "2G", + "3G", + "4G", + "5G", + "fiber", + "cable", + "wifi" + ], + "description": "The technology used; exceptions in 'extensions'" + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "Location": { + "type": "object", + "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" + }, + "streetAddress": { + "$ref": "#/$defs/StreetAddress" + }, + "coord": { + "$ref": "ts_103280_2017_07#/$defs/WGS84CoordinateDecimal" + }, + "radius": { + "$ref": "#/$defs/Radius" + }, + "azimuth": { + "$ref": "#/$defs/Azimuth" + }, + "coordPolygon": { + "type": "array", + "items": { + "$ref": "ts_103280_2017_07#/$defs/WGS84CoordinateDecimal" + } + }, + "extensions": { + "$ref": "#/$defs/Extensions" + } + } + }, + "Radius": { + "type": "integer", + "minimum": 1, + "description": "Radius in meters // maybe move to TS 103 280" + }, + "Azimuth": { + "type": "integer", + "minimum": 0, + "exclusiveMaximum": 360, + "description": "Degrees; 0 = north, 90 = east // maybe move to TS 103 280" + }, + "StreetAddress": { + "type": "object", + "properties": { + "country": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + }, + "state": { "type": "string" }, - "middeName": { - "title" : "First Name", - "description" : "Middle name(s), given as a space-delimited string", + "province": { "type": "string" }, - "lastName" : { - "title" : "Family Name", - "description" : "Family name(s)", - "type" : "string" + "city": { + "type": "string" }, - "birthDate" : { - "title" : "Date of Birth", - "description" : "Date of birth (time part can be ignored)", - "$ref" : "ts_103280_2017_07#/$defs/DateTime" + "street": { + "type": "string" }, - "gender" : { - "title" : "Gender", - "description" : "Gender of the person", - "type" : "string" + "number": { + "type": "string" + }, + "numberExtension": { + "type": "string" + }, + "zip": { + "type": "string" } - }, - "required" : ["lastName"] + } } } } \ No newline at end of file diff --git a/103705/schema/records.schema.json b/103705/schema/records.schema.json new file mode 100644 index 0000000..dab4f07 --- /dev/null +++ b/103705/schema/records.schema.json @@ -0,0 +1,23 @@ +{ + "$id": "etsi.org_ts103705_records", + "$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)", + "owner" : "{replace with owner - see TS 103 705 Table 6.3}", + "cspSchemaID" : "{replace with assigned ID - see TS 103 705 Table 6.3}", + "dateIssued" : "{replace with date issued - see TS 103 705 Table 6.3}", + "version" : "{Replace with version - see TS 103 705 Table 6.3", + "$defs": { + "record" : { + "oneOf" : [ + { + "$comment" : "This is an example", + "allOf" : [ + { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall" }, + { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall"}}} + ] + } + ] + } + } +} \ No newline at end of file diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json index 57e0e12..d70b464 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -22,14 +22,24 @@ "title": "RecordSetDescription", "description": "Provides metadata about the records being delivered (see clause 5.2)", "properties": { - "schemaId" : { "$ref" : "#/$defs/schemaId" }, - "resultSetId" : { "$ref" : "#/$defs/resultSetId"}, - "queryReference" : { "$ref" : "#/$defs/queryReference" }, - "created" : {"$ref" : "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime"}, - "recordTypes" : {"$ref" : "#/$defs/recordTypes"} + "schemaId": { + "$ref": "#/$defs/schemaId" + }, + "resultSetId": { + "$ref": "#/$defs/resultSetId" + }, + "queryReference": { + "$ref": "#/$defs/queryReference" + }, + "created": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime" + } }, "required": [ - "schemaId", "resultSetId", "queryReference", "created", "recordTypes" + "schemaId", + "resultSetId", + "queryReference", + "created" ] }, "schemaId": { @@ -37,10 +47,10 @@ }, "resultSetId": { "type": "string" - }, + }, "queryReference": { "type": "string" - }, + }, "recordSet": { "type": "array", "title": "RecordSet", @@ -49,12 +59,8 @@ "$ref": "#$defs/record" } }, - "recordTypes" : { - "type" : "object", - "title" : "RecordTypes", - "description" : "Dictionary of types used by the Response document (see clause 5.2.6)" - }, "record": { + "allOf" : [{ "$ref" : "etsi.org_ts103705_records#/$defs/record"}], "type": "object", "title": "Record", "description": "Response record (see clause 5.3)", @@ -64,13 +70,14 @@ "description": "Unique identifier for the Record within the RecordSet (see clause 5.3.2).", "type": "string" }, - "type" : { - "title" : "type", - "description" : "Type identifier, shall be mapped to a schema reference via the recrdTypes map (see clauses 5.2.6 and 5.3.3)" + "type": { + "title": "type", + "description": "Type identifier, shall be mapped to a schema reference via the recrdTypes map (see clauses 5.2.6 and 5.3.3)" } }, "required": [ - "id", "type" + "id", + "type" ] } } -- GitLab From 2000b4eeedbf38bf1a60ac4d37173bb328582052 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 30 Apr 2024 14:00:44 +0100 Subject: [PATCH 19/41] Adding more examples --- 103705/config.json | 12 +++++ .../examples/example4/csp_records.schema.json | 24 ++++++++++ 103705/examples/example4/csp_results.json | 27 +++++++++++ .../examples/example4/csp_types.schema.json | 46 +++++++++++++++++++ 103705/examples/example4/description.txt | 8 ++++ 103705/questions.txt | 19 +++++--- 6 files changed, 130 insertions(+), 6 deletions(-) create mode 100644 103705/examples/example4/csp_records.schema.json create mode 100644 103705/examples/example4/csp_results.json create mode 100644 103705/examples/example4/csp_types.schema.json create mode 100644 103705/examples/example4/description.txt diff --git a/103705/config.json b/103705/config.json index a7a6484..aaea455 100644 --- a/103705/config.json +++ b/103705/config.json @@ -32,4 +32,16 @@ "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" + ] }] \ No newline at end of file diff --git a/103705/examples/example4/csp_records.schema.json b/103705/examples/example4/csp_records.schema.json new file mode 100644 index 0000000..5960331 --- /dev/null +++ b/103705/examples/example4/csp_records.schema.json @@ -0,0 +1,24 @@ +{ + "$id": "etsi.org_ts103705_records", + "$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)", + "owner" : "Example CSP", + "cspSchemaID" : "csp.example_4", + "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 0000000..be9c901 --- /dev/null +++ b/103705/examples/example4/csp_results.json @@ -0,0 +1,27 @@ +{ + "recordSetDescription": { + "schemaId": "etsi.org/ts_103_705/1.1.1", + "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", + "queryReference": "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 0000000..4d88812 --- /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" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/Pointer" + }, + "deliveryAddress" : { + "description" : "Points to the address used for delivery", + "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/Pointer" + }, + "billingAddress" : { + "description" : "Points to the address used for billing", + "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/Pointer" + }, + "contactAddress" : { + "description" : "Points to the address used for mailing purposes", + "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$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 0000000..b4169d5 --- /dev/null +++ b/103705/examples/example4/description.txt @@ -0,0 +1,8 @@ +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 diff --git a/103705/questions.txt b/103705/questions.txt index 58a8805..b7f0710 100644 --- a/103705/questions.txt +++ b/103705/questions.txt @@ -1,17 +1,19 @@ ----- -CSP wants to use completely standard records +Examples: -CSP wants to use a mix of standard records and extended ones +Example 1: CSP uses completely standard records -CSP wants to use a completely novel type of record +Example 2: CSP uses a mix of standard records and extended ones -CSP wants self-contained records (non-normalised) +Example 3: CSP uses a completely novel type of record -CSP wants normalised pointer records (requires extension) +Example 4: CSP uses normalised pointer records ----- +705 structure questions: + (Also consider our extensions i.e. version management) (Also consider allocating a urn for our schema namespaces) @@ -21,7 +23,9 @@ Also need descriptions in with ref (description of field is different to descrip ----- -Lots of overlap in e.g. messaging / call. Could we factor out common bits and use allOf constraint? +New "standard type" questions: + +There is lots of overlap in e.g. messaging / call. Could we factor out common bits and use allOf constraint? Subtle problem with "oneOf" constraint e.g. InformationCall and InformationMessaging validate nearly the same documents @@ -41,6 +45,9 @@ InformationMessaging - does "timeBegin" and "timeEnd" make sense if this is a single messaging event? - descriptions should ideally describe meaning as well as format (i.e. not just talking about trailing zeroes) +Extensions +- Are they needed? Also not sure how they work with enums + ----- JSON test issues -- GitLab From 903020040fa0e06440a0b99e6f350f4eee8658de Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 1 May 2024 08:26:23 +0100 Subject: [PATCH 20/41] Matching doc --- 103705/examples/example1/csp_results.json | 4 +++- 103705/examples/example2/csp_results.json | 4 +++- 103705/examples/example3/csp_results.json | 4 +++- 103705/examples/example4/csp_results.json | 4 +++- 103705/schema/response.schema.json | 15 +++++++++++++-- 5 files changed, 25 insertions(+), 6 deletions(-) diff --git a/103705/examples/example1/csp_results.json b/103705/examples/example1/csp_results.json index eb31016..fda316d 100644 --- a/103705/examples/example1/csp_results.json +++ b/103705/examples/example1/csp_results.json @@ -1,6 +1,8 @@ { "recordSetDescription": { - "schemaId": "etsi.org/ts_103_705/1.1.1", + "etsiSchemaId": "etsi.org/ts_103_705/1.1.1", + "etsiVersion": "1.1.1", + "cspSchemaId" : "csp.example_1", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" diff --git a/103705/examples/example2/csp_results.json b/103705/examples/example2/csp_results.json index 14a0804..f6700b1 100644 --- a/103705/examples/example2/csp_results.json +++ b/103705/examples/example2/csp_results.json @@ -1,6 +1,8 @@ { "recordSetDescription": { - "schemaId": "etsi.org/ts_103_705/1.1.1", + "etsiSchemaId": "etsi.org/ts_103_705/1.1.1", + "etsiVersion": "1.1.1", + "cspSchemaId" : "csp.example_2", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" diff --git a/103705/examples/example3/csp_results.json b/103705/examples/example3/csp_results.json index 4f88e97..4c94424 100644 --- a/103705/examples/example3/csp_results.json +++ b/103705/examples/example3/csp_results.json @@ -1,6 +1,8 @@ { "recordSetDescription": { - "schemaId": "etsi.org/ts_103_705/1.1.1", + "etsiSchemaId": "etsi.org/ts_103_705/1.1.1", + "etsiVersion": "1.1.1", + "cspSchemaId" : "csp.example_3", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" diff --git a/103705/examples/example4/csp_results.json b/103705/examples/example4/csp_results.json index be9c901..d16548b 100644 --- a/103705/examples/example4/csp_results.json +++ b/103705/examples/example4/csp_results.json @@ -1,6 +1,8 @@ { "recordSetDescription": { - "schemaId": "etsi.org/ts_103_705/1.1.1", + "etsiSchemaId": "etsi.org/ts_103_705/1.1.1", + "etsiVersion": "1.1.1", + "cspSchemaId" : "csp.example_4", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json index d70b464..cc7f92e 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -22,7 +22,16 @@ "title": "RecordSetDescription", "description": "Provides metadata about the records being delivered (see clause 5.2)", "properties": { - "schemaId": { + "etsiSchemaId": { + "description" : "ID of the ETSI JSON schema used by the Response (see clause 5.2.1)", + "$ref": "#/$defs/schemaId" + }, + "etsiVersion": { + "description" : "Version of ETSI TS 103 705 usd by the Response (see clause 5.2.3)", + "$ref": "#/$defs/schemaId" + }, + "cspSchemaId" : { + "description" : "ID of CSP Record Schema usd by the Response (see clause 5.2.4)", "$ref": "#/$defs/schemaId" }, "resultSetId": { @@ -36,7 +45,9 @@ } }, "required": [ - "schemaId", + "etsiSchemaId", + "etsiVersion", + "cspSchemaId", "resultSetId", "queryReference", "created" -- GitLab From 2cf616d5bde64ab30a15e75adb9b65cb8af23a65 Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 9 May 2024 10:54:55 +0100 Subject: [PATCH 21/41] Updates from Herbert and Frank --- 103705/schema/etsi_types.schema.json | 71 ++-------------------------- 103705/schema/response.schema.json | 2 +- 2 files changed, 5 insertions(+), 68 deletions(-) diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index 4179e44..3d1e029 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -65,9 +65,6 @@ "bearer": { "$ref": "#/$defs/Bearer", "description": "In case one set of bearer information is availble" - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -96,9 +93,6 @@ "items": { "$ref": "#/$defs/PartyInformationMessaging" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -127,9 +121,6 @@ "items": { "$ref": "#/$defs/PartyInformationEmail" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -158,9 +149,6 @@ "items": { "$ref": "#/$defs/PartyInformationChat" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -192,9 +180,6 @@ }, "volume": { "$ref": "#/$defs/DataVolume" - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -223,9 +208,6 @@ "items": { "$ref": "#/$defs/PartyInformationOther" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -252,9 +234,6 @@ "items": { "$ref": "#/$defs/Location" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -279,9 +258,6 @@ "items": { "$ref": "#/$defs/Location" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -306,9 +282,6 @@ "items": { "$ref": "#/$defs/Location" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -327,9 +300,6 @@ "items": { "$ref": "#/$defs/Location" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -354,9 +324,6 @@ "items": { "$ref": "#/$defs/Location" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -375,9 +342,6 @@ "items": { "$ref": "#/$defs/Location" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -401,9 +365,6 @@ }, "unstructuredPhoneNumber": { "type": "string" - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -427,9 +388,6 @@ }, "unstructuredPhoneNumber": { "type": "string" - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -444,9 +402,6 @@ }, "iPv6Address": { "$ref": "ts_103280_2017_07#/$defs/IPv6Address" - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -455,9 +410,6 @@ "properties": { "ServiceAccessIdentifier": { "$ref": "ts_103280_2017_07#/$defs/ServiceAccessIdentifier" - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -502,20 +454,10 @@ }, "unstructuredPhoneNumber": { "type": "string" - }, - "extensions": { - "$ref": "#/$defs/Extensions" - } - } - }, - "PartyIdOther": { - "type": "object", - "properties": { - "extensions": { - "$ref": "#/$defs/Extensions" } } }, + "// ==== Leaf data types ====": {}, "DataVolume": { "type": "object", @@ -544,11 +486,9 @@ "cable", "wifi" ], - "description": "The technology used; exceptions in 'extensions'" - }, - "extensions": { - "$ref": "#/$defs/Extensions" + "description": "The technology used;" } + } }, "Location": { @@ -583,9 +523,6 @@ "items": { "$ref": "ts_103280_2017_07#/$defs/WGS84CoordinateDecimal" } - }, - "extensions": { - "$ref": "#/$defs/Extensions" } } }, @@ -630,4 +567,4 @@ } } } -} \ No newline at end of file +} diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json index cc7f92e..d3372af 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -83,7 +83,7 @@ }, "type": { "title": "type", - "description": "Type identifier, shall be mapped to a schema reference via the recrdTypes map (see clauses 5.2.6 and 5.3.3)" + "description": "A JSON Pointer to the schema definition that defines the type (see clause 5.3.3)" } }, "required": [ -- GitLab From 86b5c3dfa019042fe964f7b2f2f71050c433f77a Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 16 May 2024 15:21:16 +0100 Subject: [PATCH 22/41] Initial renaming following call, and removing Chat+Other --- .../examples/example1/csp_records.schema.json | 8 +- 103705/examples/example1/csp_results.json | 4 +- .../examples/example2/csp_records.schema.json | 4 +- 103705/examples/example2/csp_results.json | 2 +- .../examples/example2/csp_types.schema.json | 2 +- .../examples/example3/csp_records.schema.json | 4 +- 103705/examples/example3/csp_results.json | 2 +- 103705/questions.txt | 6 + 103705/schema/etsi_types.schema.json | 158 +++--------------- 9 files changed, 43 insertions(+), 147 deletions(-) diff --git a/103705/examples/example1/csp_records.schema.json b/103705/examples/example1/csp_records.schema.json index 08ccf9f..8b337d5 100644 --- a/103705/examples/example1/csp_records.schema.json +++ b/103705/examples/example1/csp_records.schema.json @@ -11,13 +11,13 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall" }, - { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall"}}} + { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord"}}} ]}, { "allOf" : [ - { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationMessaging" }, - { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationMessaging"}}} + { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/MessagingRecord" }, + { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/MessagingRecord"}}} ]} ] } diff --git a/103705/examples/example1/csp_results.json b/103705/examples/example1/csp_results.json index fda316d..a50fcf1 100644 --- a/103705/examples/example1/csp_results.json +++ b/103705/examples/example1/csp_results.json @@ -10,7 +10,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall", + "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, @@ -27,7 +27,7 @@ }, { "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", - "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationMessaging", + "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/MessagingRecord", "timeBegin": "2024-04-18T10:04:00.000000Z", "parties": [ { diff --git a/103705/examples/example2/csp_records.schema.json b/103705/examples/example2/csp_records.schema.json index 774cb7d..66a3081 100644 --- a/103705/examples/example2/csp_records.schema.json +++ b/103705/examples/example2/csp_records.schema.json @@ -11,8 +11,8 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall" }, - { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall"}}} + { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord"}}} ]}, { "allOf" : [ diff --git a/103705/examples/example2/csp_results.json b/103705/examples/example2/csp_results.json index f6700b1..4cbac9c 100644 --- a/103705/examples/example2/csp_results.json +++ b/103705/examples/example2/csp_results.json @@ -10,7 +10,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall", + "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, diff --git a/103705/examples/example2/csp_types.schema.json b/103705/examples/example2/csp_types.schema.json index d0d04d8..1d1006d 100644 --- a/103705/examples/example2/csp_types.schema.json +++ b/103705/examples/example2/csp_types.schema.json @@ -5,7 +5,7 @@ "description": "JSON schema for ETSI-defined types (see clause 6.1 and Annex A)", "$defs": { "CSPMessagingRecord" : { - "allOf" : [{ "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationMessaging"}], + "allOf" : [{ "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/MessagingRecord"}], "properties" : { "CSPMessagingReference" : { "$ref" : "ts_103280_2017_07#/$defs/UUID"} } diff --git a/103705/examples/example3/csp_records.schema.json b/103705/examples/example3/csp_records.schema.json index 6550acb..728b10a 100644 --- a/103705/examples/example3/csp_records.schema.json +++ b/103705/examples/example3/csp_records.schema.json @@ -11,8 +11,8 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall" }, - { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall"}}} + { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord"}}} ]}, { "allOf" : [ diff --git a/103705/examples/example3/csp_results.json b/103705/examples/example3/csp_results.json index 4c94424..077f7fd 100644 --- a/103705/examples/example3/csp_results.json +++ b/103705/examples/example3/csp_results.json @@ -10,7 +10,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall", + "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, diff --git a/103705/questions.txt b/103705/questions.txt index b7f0710..cefb6d8 100644 --- a/103705/questions.txt +++ b/103705/questions.txt @@ -1,3 +1,9 @@ +To do: + +Ensure consistent naming in the ETSI types schema +Make sure that the ETSI types schema follows the documentation guidelines +Draft a metaschema that enforces the above + ----- Examples: diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index 3d1e029..8f6b898 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -24,7 +24,7 @@ ] } }, - "InformationCall": { + "CallRecord": { "type": "object", "title": "Information about call details", "description": "Details about a record or event related to a call", @@ -55,7 +55,7 @@ "parties": { "type": "array", "items": { - "$ref": "#/$defs/PartyInformationCall" + "$ref": "#/$defs/CallPartyInformation" } }, "endReason": { @@ -68,7 +68,7 @@ } } }, - "InformationMessaging": { + "MessagingRecord": { "type": "object", "title": "Information about messaging details", "description": "Details about a record or event related to a message", @@ -80,23 +80,19 @@ "type": "string", "description": "A reference identifier to uniquely identify the message" }, - "timeBegin": { - "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", - "description": "Unknown fractions of the time to be filled-in with zeros" - }, - "timeEnd": { + "eventTime": { "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", "description": "Unknown fractions of the time to be filled-in with zeros" }, "parties": { "type": "array", "items": { - "$ref": "#/$defs/PartyInformationMessaging" + "$ref": "#/$defs/MessagingPartyInformation" } } } }, - "InformationEmail": { + "EmailRecord": { "type": "object", "title": "Information about email details", "description": "Details about a record or event related to an email", @@ -108,26 +104,22 @@ "type": "string", "description": "A reference identifier to uniquely identify the message" }, - "timeBegin": { - "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", - "description": "Unknown fractions of the time to be filled-in with zeros" - }, - "timeEnd": { + "eventTime": { "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", "description": "Unknown fractions of the time to be filled-in with zeros" }, "parties": { "type": "array", "items": { - "$ref": "#/$defs/PartyInformationEmail" + "$ref": "#/$defs/EmailPartyInformation" } } } }, - "InformationChat": { + "DataAccessRecord": { "type": "object", - "title": "Information about chat details", - "description": "Details about a record or event related to a chat", + "title": "Data Record", + "description": "Information about a data access session (e.g. a mobile data session)", "required": [ "timeBegin" ], @@ -147,35 +139,7 @@ "parties": { "type": "array", "items": { - "$ref": "#/$defs/PartyInformationChat" - } - } - } - }, - "InformationData": { - "type": "object", - "title": "Information about email details", - "description": "Details about a record or event related to an email", - "required": [ - "timeBegin" - ], - "properties": { - "sessionRefId": { - "type": "string", - "description": "A reference identifier to uniquely identify the message" - }, - "timeBegin": { - "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", - "description": "Unknown fractions of the time to be filled-in with zeros" - }, - "timeEnd": { - "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", - "description": "Unknown fractions of the time to be filled-in with zeros" - }, - "parties": { - "type": "array", - "items": { - "$ref": "#/$defs/PartyInformationEmail" + "$ref": "#/$defs/DataAccessPartyInformation" } }, "volume": { @@ -183,39 +147,11 @@ } } }, - "InformationOther": { - "type": "object", - "title": "Information about other details", - "description": "Details about a record or event which can not by fitted in any of the above structures", - "required": [ - "timeBegin" - ], - "properties": { - "sessionRefId": { - "type": "string", - "description": "A reference identifier to uniquely identify the message" - }, - "timeBegin": { - "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", - "description": "Unknown fractions of the time to be filled-in with zeros" - }, - "timeEnd": { - "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", - "description": "Unknown fractions of the time to be filled-in with zeros" - }, - "parties": { - "type": "array", - "items": { - "$ref": "#/$defs/PartyInformationOther" - } - } - } - }, - "PartyInformationCall": { + "CallPartyInformation": { "type": "object", "properties": { "identity": { - "$ref": "#/$defs/PartyIdCall" + "$ref": "#/$defs/CallPartyId" }, "role": { "enum": [ @@ -237,11 +173,11 @@ } } }, - "PartyInformationMessaging": { + "MessagingPartyInformation": { "type": "object", "properties": { "identity": { - "$ref": "#/$defs/PartyIdMessaging" + "$ref": "#/$defs/MessagingPartyId" }, "role": { "enum": [ @@ -261,11 +197,11 @@ } } }, - "PartyInformationEmail": { + "EmailPartyInformation": { "type": "object", "properties": { "identity": { - "$ref": "#/$defs/PartyIdEmail" + "$ref": "#/$defs/EmailPartyId" }, "role": { "enum": [ @@ -285,29 +221,11 @@ } } }, - "PartyInformationChat": { - "type": "object", - "properties": { - "identity": { - "$ref": "#/$defs/PartyIdChat" - }, - "bearer": { - "$ref": "#/$defs/Bearer", - "description": "For bearer information specific for this party" - }, - "locations": { - "type": "array", - "items": { - "$ref": "#/$defs/Location" - } - } - } - }, - "PartyInformationData": { + "DataAccessPartyInformation": { "type": "object", "properties": { "identity": { - "$ref": "#/$defs/PartyIdData" + "$ref": "#/$defs/DataPartyId" }, "aPN": { "type": "string" @@ -327,25 +245,7 @@ } } }, - "PartyInformationOther": { - "type": "object", - "properties": { - "identity": { - "$ref": "#/$defs/PartyIdOther" - }, - "bearer": { - "$ref": "#/$defs/Bearer", - "description": "For bearer information specific for this party" - }, - "locations": { - "type": "array", - "items": { - "$ref": "#/$defs/Location" - } - } - } - }, - "PartyIdCall": { + "CallPartyId": { "type": "object", "properties": { "mSISDN": { @@ -368,7 +268,7 @@ } } }, - "PartyIdMessaging": { + "MessagingPartyId": { "type": "object", "properties": { "mSISDN": { @@ -391,7 +291,7 @@ } } }, - "PartyIdEmail": { + "EmailPartyId": { "type": "object", "properties": { "emailAddress": { @@ -405,15 +305,7 @@ } } }, - "PartyIdChat": { - "type": "object", - "properties": { - "ServiceAccessIdentifier": { - "$ref": "ts_103280_2017_07#/$defs/ServiceAccessIdentifier" - } - } - }, - "PartyIdData": { + "DataAccessPartyId": { "type": "object", "properties": { "mSISDN": { @@ -457,8 +349,6 @@ } } }, - - "// ==== Leaf data types ====": {}, "DataVolume": { "type": "object", "properties": { -- GitLab From bf3d355f999d96052b7e83e9afe279d98fc10ce8 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 28 May 2024 14:28:56 +0100 Subject: [PATCH 23/41] Correcting recordSetDescription errors and $id values --- .../examples/example1/csp_records.schema.json | 10 +-- 103705/examples/example1/csp_results.json | 9 +-- .../examples/example2/csp_records.schema.json | 6 +- 103705/examples/example2/csp_results.json | 7 ++- .../examples/example2/csp_types.schema.json | 2 +- .../examples/example3/csp_records.schema.json | 6 +- 103705/examples/example3/csp_results.json | 7 ++- .../examples/example3/csp_types.schema.json | 2 +- .../examples/example4/csp_records.schema.json | 2 +- 103705/examples/example4/csp_results.json | 5 +- .../examples/example4/csp_types.schema.json | 8 +-- 103705/generate_docs.py | 2 - 103705/questions.txt | 62 ------------------- 103705/schema/etsi_types.schema.json | 2 +- 103705/schema/records.schema.json | 12 ++-- 103705/schema/response.schema.json | 21 +++++-- 16 files changed, 56 insertions(+), 107 deletions(-) delete mode 100644 103705/generate_docs.py delete mode 100644 103705/questions.txt diff --git a/103705/examples/example1/csp_records.schema.json b/103705/examples/example1/csp_records.schema.json index 8b337d5..e4047ba 100644 --- a/103705/examples/example1/csp_records.schema.json +++ b/103705/examples/example1/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "etsi.org_ts103705_records", + "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", "$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)", @@ -11,13 +11,13 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord"}}} + { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord"}}} ]}, { "allOf" : [ - { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/MessagingRecord" }, - { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/MessagingRecord"}}} + { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord"}}} ]} ] } diff --git a/103705/examples/example1/csp_results.json b/103705/examples/example1/csp_results.json index a50fcf1..3fc4da3 100644 --- a/103705/examples/example1/csp_results.json +++ b/103705/examples/example1/csp_results.json @@ -1,8 +1,9 @@ { "recordSetDescription": { - "etsiSchemaId": "etsi.org/ts_103_705/1.1.1", - "etsiVersion": "1.1.1", + "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", + "etsiSpecificationVersion": "0.3.0", "cspSchemaId" : "csp.example_1", + "cspSchemaVersion" : "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" @@ -10,7 +11,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord", + "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, @@ -27,7 +28,7 @@ }, { "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", - "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/MessagingRecord", + "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord", "timeBegin": "2024-04-18T10:04:00.000000Z", "parties": [ { diff --git a/103705/examples/example2/csp_records.schema.json b/103705/examples/example2/csp_records.schema.json index 66a3081..af09841 100644 --- a/103705/examples/example2/csp_records.schema.json +++ b/103705/examples/example2/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "etsi.org_ts103705_records", + "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", "$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)", @@ -11,8 +11,8 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord"}}} + { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord"}}} ]}, { "allOf" : [ diff --git a/103705/examples/example2/csp_results.json b/103705/examples/example2/csp_results.json index 4cbac9c..cdfe149 100644 --- a/103705/examples/example2/csp_results.json +++ b/103705/examples/example2/csp_results.json @@ -1,8 +1,9 @@ { "recordSetDescription": { - "etsiSchemaId": "etsi.org/ts_103_705/1.1.1", - "etsiVersion": "1.1.1", + "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", + "etsiSpecificationVersion": "0.3.0", "cspSchemaId" : "csp.example_2", + "cspSchemaVersion" : "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" @@ -10,7 +11,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord", + "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, diff --git a/103705/examples/example2/csp_types.schema.json b/103705/examples/example2/csp_types.schema.json index 1d1006d..7f2cca7 100644 --- a/103705/examples/example2/csp_types.schema.json +++ b/103705/examples/example2/csp_types.schema.json @@ -5,7 +5,7 @@ "description": "JSON schema for ETSI-defined types (see clause 6.1 and Annex A)", "$defs": { "CSPMessagingRecord" : { - "allOf" : [{ "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/MessagingRecord"}], + "allOf" : [{ "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord"}], "properties" : { "CSPMessagingReference" : { "$ref" : "ts_103280_2017_07#/$defs/UUID"} } diff --git a/103705/examples/example3/csp_records.schema.json b/103705/examples/example3/csp_records.schema.json index 728b10a..c586b79 100644 --- a/103705/examples/example3/csp_records.schema.json +++ b/103705/examples/example3/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "etsi.org_ts103705_records", + "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", "$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)", @@ -11,8 +11,8 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord"}}} + { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord"}}} ]}, { "allOf" : [ diff --git a/103705/examples/example3/csp_results.json b/103705/examples/example3/csp_results.json index 077f7fd..a2fa1d7 100644 --- a/103705/examples/example3/csp_results.json +++ b/103705/examples/example3/csp_results.json @@ -1,8 +1,9 @@ { "recordSetDescription": { - "etsiSchemaId": "etsi.org/ts_103_705/1.1.1", - "etsiVersion": "1.1.1", + "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", + "etsiSpecificationVersion": "0.3.0", "cspSchemaId" : "csp.example_3", + "cspSchemaVersion" : "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" @@ -10,7 +11,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "etsi.org_ts103705_1.3.1_etsi-types#/$defs/CallRecord", + "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, diff --git a/103705/examples/example3/csp_types.schema.json b/103705/examples/example3/csp_types.schema.json index 0299c7d..c54042c 100644 --- a/103705/examples/example3/csp_types.schema.json +++ b/103705/examples/example3/csp_types.schema.json @@ -15,7 +15,7 @@ }, "dataVolumeUsed" : { "description" : "A data volume associated with this service record (using an ETSI TS 103 705 type) ", - "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/DataVolume" + "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/DataVolume" }, "numberOfService" : { "description" : "Some number associated with this service record (using a native JSON type)", diff --git a/103705/examples/example4/csp_records.schema.json b/103705/examples/example4/csp_records.schema.json index 5960331..66d9cf5 100644 --- a/103705/examples/example4/csp_records.schema.json +++ b/103705/examples/example4/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "etsi.org_ts103705_records", + "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", "$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)", diff --git a/103705/examples/example4/csp_results.json b/103705/examples/example4/csp_results.json index d16548b..cf1c20a 100644 --- a/103705/examples/example4/csp_results.json +++ b/103705/examples/example4/csp_results.json @@ -1,8 +1,9 @@ { "recordSetDescription": { - "etsiSchemaId": "etsi.org/ts_103_705/1.1.1", - "etsiVersion": "1.1.1", + "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", + "etsiSpecificationVersion": "0.3.0", "cspSchemaId" : "csp.example_4", + "cspSchemaVersion" : "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" diff --git a/103705/examples/example4/csp_types.schema.json b/103705/examples/example4/csp_types.schema.json index 4d88812..d845c24 100644 --- a/103705/examples/example4/csp_types.schema.json +++ b/103705/examples/example4/csp_types.schema.json @@ -15,19 +15,19 @@ }, "registeredAddress" : { "description" : "Points to the address registered as part of the service", - "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/Pointer" + "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/Pointer" }, "deliveryAddress" : { "description" : "Points to the address used for delivery", - "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/Pointer" + "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/Pointer" }, "billingAddress" : { "description" : "Points to the address used for billing", - "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/Pointer" + "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/Pointer" }, "contactAddress" : { "description" : "Points to the address used for mailing purposes", - "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/Pointer" + "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/Pointer" } } }, diff --git a/103705/generate_docs.py b/103705/generate_docs.py deleted file mode 100644 index 8837e1f..0000000 --- a/103705/generate_docs.py +++ /dev/null @@ -1,2 +0,0 @@ -import json -from pathlib import Path diff --git a/103705/questions.txt b/103705/questions.txt deleted file mode 100644 index cefb6d8..0000000 --- a/103705/questions.txt +++ /dev/null @@ -1,62 +0,0 @@ -To do: - -Ensure consistent naming in the ETSI types schema -Make sure that the ETSI types schema follows the documentation guidelines -Draft a metaschema that enforces the above - ------ - -Examples: - -Example 1: CSP uses completely standard records - -Example 2: CSP uses a mix of standard records and extended ones - -Example 3: CSP uses a completely novel type of record - -Example 4: CSP uses normalised pointer records - ------ - -705 structure questions: - -(Also consider our extensions i.e. version management) -(Also consider allocating a urn for our schema namespaces) - -Wondering whether title + description really adds anything. Maybe only need description? - -Also need descriptions in with ref (description of field is different to description of type) - ------ - -New "standard type" questions: - -There is lots of overlap in e.g. messaging / call. Could we factor out common bits and use allOf constraint? - -Subtle problem with "oneOf" constraint -e.g. InformationCall and InformationMessaging validate nearly the same documents -(so e.g using "originating" and "terminating" in PartyMessaging works just fine - even though it shouldn't) -More seriously - if you only use fields common to both, "oneOf" fails because the instance document can match multiple. -Could solve both of these by setting the "type" to a constant (but maintenance overhead) -BUT this would cause issues with using allOf to extend things -Maybe factor out record from type? i.e. CallRecord = CallInformation + type = blah -OR make that part of the convention when importing in the record schema (i.e a record definition has -to include a allOf (type) + type (const) declaration) - -Q.850 end reason -- Is this always valid (i.e. non-PSTN call)? Or is it the other way round (provide it if you have one, don't if you don't) -- Can it be more constrained (it's a 7-bit field and 0 isn't valid, so 1-127?) - -InformationMessaging -- does "timeBegin" and "timeEnd" make sense if this is a single messaging event? -- descriptions should ideally describe meaning as well as format (i.e. not just talking about trailing zeroes) - -Extensions -- Are they needed? Also not sure how they work with enums - ------ - -JSON test issues -- globbing dirs from config file breaks -- RefResolutionError raises exception into calling process rather than a BuildError (sort of fixed now) -- RefResolution wasn't extended to all supporting schemas (now is, but all lumped under main file - fix) diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index 8f6b898..e328506 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -1,5 +1,5 @@ { - "$id": "etsi.org_ts103705_1.3.1_etsi-types", + "$id": "urn:etsi:li:ts103705_type_schema_id:0.3.0", "$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)", diff --git a/103705/schema/records.schema.json b/103705/schema/records.schema.json index dab4f07..29d17ef 100644 --- a/103705/schema/records.schema.json +++ b/103705/schema/records.schema.json @@ -1,20 +1,20 @@ { - "$id": "etsi.org_ts103705_records", + "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", "$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)", "owner" : "{replace with owner - see TS 103 705 Table 6.3}", - "cspSchemaID" : "{replace with assigned ID - see TS 103 705 Table 6.3}", - "dateIssued" : "{replace with date issued - see TS 103 705 Table 6.3}", - "version" : "{Replace with version - see TS 103 705 Table 6.3", + "cspSchemaID" : "{replace with assigned ID - see TS 103 705 Table 6.2}", + "dateIssued" : "{replace with date issued - see TS 103 705 Table 6.2}", + "version" : "{Replace with version - see TS 103 705 Table 6.2}", "$defs": { "record" : { "oneOf" : [ { "$comment" : "This is an example", "allOf" : [ - { "$ref" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall" }, - { "properties" : { "type" : { "const" : "etsi.org_ts103705_1.3.1_etsi-types#/$defs/InformationCall"}}} + { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord"}}} ] } ] diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json index d3372af..2ab1fbf 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -1,5 +1,5 @@ { - "$id": "etsi.org_ts103705_1.3.1", + "$id": "urn:etsi:li:ts103705_schema_id:0.3.0", "$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 query (see clause 5)", @@ -26,14 +26,18 @@ "description" : "ID of the ETSI JSON schema used by the Response (see clause 5.2.1)", "$ref": "#/$defs/schemaId" }, - "etsiVersion": { + "etsiSpecificationVersion": { "description" : "Version of ETSI TS 103 705 usd by the Response (see clause 5.2.3)", - "$ref": "#/$defs/schemaId" + "$ref": "#/$defs/version" }, "cspSchemaId" : { "description" : "ID of CSP Record Schema usd by the Response (see clause 5.2.4)", "$ref": "#/$defs/schemaId" }, + "cspSchemaVersion" : { + "description" : "the version number assigned by the CSP to the CSP Record Schema identified by the cspSchemaId (see clause 5.2.5)", + "$ref": "#/$defs/version" + }, "resultSetId": { "$ref": "#/$defs/resultSetId" }, @@ -46,8 +50,9 @@ }, "required": [ "etsiSchemaId", - "etsiVersion", + "etsiSpecificationVersion", "cspSchemaId", + "cspSchemaVersion", "resultSetId", "queryReference", "created" @@ -56,6 +61,10 @@ "schemaId": { "type": "string" }, + "version": { + "type" : "string", + "pattern" : "^[0-9]+\\.[0-9]+\\.[0-9]+$" + }, "resultSetId": { "type": "string" }, @@ -67,11 +76,11 @@ "title": "RecordSet", "description": "RecordSet (see clause 5.3). Contains a set of Records.", "items": { - "$ref": "#$defs/record" + "$ref": "#/$defs/record" } }, "record": { - "allOf" : [{ "$ref" : "etsi.org_ts103705_records#/$defs/record"}], + "allOf" : [{ "$ref" : "urn:etsi:li:ts103705_record_schema_id:0.3.0#/$defs/record"}], "type": "object", "title": "Record", "description": "Response record (see clause 5.3)", -- GitLab From a46c58a9299e205880064ee3f7d57bf9713b148d Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 31 May 2024 11:20:08 +0100 Subject: [PATCH 24/41] Updating descriptions from latest draft --- 103705/schema/etsi_types.schema.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index e328506..073539c 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -149,6 +149,7 @@ }, "CallPartyInformation": { "type": "object", + "description" : "Information about the participants and technologies related to the call", "properties": { "identity": { "$ref": "#/$defs/CallPartyId" @@ -175,6 +176,7 @@ }, "MessagingPartyInformation": { "type": "object", + "description": "Information about the participants and technologies related to the messages", "properties": { "identity": { "$ref": "#/$defs/MessagingPartyId" @@ -199,6 +201,7 @@ }, "EmailPartyInformation": { "type": "object", + "description": "Information about the participants and technologies related to the messages", "properties": { "identity": { "$ref": "#/$defs/EmailPartyId" @@ -223,6 +226,7 @@ }, "DataAccessPartyInformation": { "type": "object", + "description": "Information about the participants and technologies related to the data service", "properties": { "identity": { "$ref": "#/$defs/DataPartyId" @@ -247,6 +251,7 @@ }, "CallPartyId": { "type": "object", + "description": "Identifier of the party related to the call", "properties": { "mSISDN": { "$ref": "ts_103280_2017_07#/$defs/InternationalE164" @@ -270,6 +275,7 @@ }, "MessagingPartyId": { "type": "object", + "description": "Identifier of the party related to the message", "properties": { "mSISDN": { "$ref": "ts_103280_2017_07#/$defs/InternationalE164" @@ -293,6 +299,7 @@ }, "EmailPartyId": { "type": "object", + "description": "Identifier of the party related to the message", "properties": { "emailAddress": { "$ref": "ts_103280_2017_07#/$defs/EmailAddress" @@ -307,6 +314,7 @@ }, "DataAccessPartyId": { "type": "object", + "description": "Identifier of the party related to the data service", "properties": { "mSISDN": { "$ref": "ts_103280_2017_07#/$defs/InternationalE164" @@ -351,6 +359,7 @@ }, "DataVolume": { "type": "object", + "description": "quantification of the bytes exchanged", "properties": { "bytesUpload": { "type": "integer" @@ -365,6 +374,7 @@ }, "Bearer": { "type": "object", + "description": "The Technology used", "properties": { "technology": { "enum": [ @@ -383,6 +393,7 @@ }, "Location": { "type": "object", + "description": "Location information of the party", "properties": { "cGI": { "$ref": "ts_103280_2017_07#/$defs/CGI" -- GitLab From 30a64faa81eeb752d7b8bbc8650a22d771f15373 Mon Sep 17 00:00:00 2001 From: mark Date: Mon, 3 Jun 2024 16:39:19 +0100 Subject: [PATCH 25/41] Removing 'owner' --- 103705/examples/example1/csp_records.schema.json | 1 - 103705/examples/example2/csp_records.schema.json | 1 - 103705/examples/example3/csp_records.schema.json | 1 - 103705/examples/example4/csp_records.schema.json | 1 - 103705/schema/records.schema.json | 1 - 5 files changed, 5 deletions(-) diff --git a/103705/examples/example1/csp_records.schema.json b/103705/examples/example1/csp_records.schema.json index e4047ba..8668141 100644 --- a/103705/examples/example1/csp_records.schema.json +++ b/103705/examples/example1/csp_records.schema.json @@ -3,7 +3,6 @@ "$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)", - "owner" : "Example CSP", "cspSchemaID" : "csp.example_1", "dateIssued" : "2024-04-024T09:00:01Z", "version" : "1.1.1", diff --git a/103705/examples/example2/csp_records.schema.json b/103705/examples/example2/csp_records.schema.json index af09841..1cd1c89 100644 --- a/103705/examples/example2/csp_records.schema.json +++ b/103705/examples/example2/csp_records.schema.json @@ -3,7 +3,6 @@ "$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)", - "owner" : "Example CSP", "cspSchemaID" : "csp.example_2", "dateIssued" : "2024-04-024T09:00:01Z", "version" : "1.1.1", diff --git a/103705/examples/example3/csp_records.schema.json b/103705/examples/example3/csp_records.schema.json index c586b79..1194dc5 100644 --- a/103705/examples/example3/csp_records.schema.json +++ b/103705/examples/example3/csp_records.schema.json @@ -3,7 +3,6 @@ "$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)", - "owner" : "Example CSP", "cspSchemaID" : "csp.example_3", "dateIssued" : "2024-04-024T09:00:01Z", "version" : "1.1.1", diff --git a/103705/examples/example4/csp_records.schema.json b/103705/examples/example4/csp_records.schema.json index 66d9cf5..7503f36 100644 --- a/103705/examples/example4/csp_records.schema.json +++ b/103705/examples/example4/csp_records.schema.json @@ -3,7 +3,6 @@ "$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)", - "owner" : "Example CSP", "cspSchemaID" : "csp.example_4", "dateIssued" : "2024-04-024T09:00:01Z", "version" : "1.1.1", diff --git a/103705/schema/records.schema.json b/103705/schema/records.schema.json index 29d17ef..58ac74b 100644 --- a/103705/schema/records.schema.json +++ b/103705/schema/records.schema.json @@ -3,7 +3,6 @@ "$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)", - "owner" : "{replace with owner - see TS 103 705 Table 6.3}", "cspSchemaID" : "{replace with assigned ID - see TS 103 705 Table 6.2}", "dateIssued" : "{replace with date issued - see TS 103 705 Table 6.2}", "version" : "{Replace with version - see TS 103 705 Table 6.2}", -- GitLab From fe163fd6e1c63ba02503c1532c414f38574628b0 Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 20 Jun 2024 09:48:17 +0100 Subject: [PATCH 26/41] Adding schema support for signatures and skeleton example --- 103705/config.json | 11 +++++ .../examples/example5/csp_records.schema.json | 24 +++++++++ 103705/examples/example5/csp_results.json | 49 +++++++++++++++++++ 103705/examples/example5/description.txt | 6 +++ 103705/schema/response.schema.json | 17 +++++++ 5 files changed, 107 insertions(+) create mode 100644 103705/examples/example5/csp_records.schema.json create mode 100644 103705/examples/example5/csp_results.json create mode 100644 103705/examples/example5/description.txt diff --git a/103705/config.json b/103705/config.json index aaea455..6d4bac9 100644 --- a/103705/config.json +++ b/103705/config.json @@ -44,4 +44,15 @@ "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/example5/csp_records.schema.json b/103705/examples/example5/csp_records.schema.json new file mode 100644 index 0000000..b569878 --- /dev/null +++ b/103705/examples/example5/csp_records.schema.json @@ -0,0 +1,24 @@ +{ + "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", + "$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", + "dateIssued" : "2024-06-20 09:42:37", + "version" : "1.1.1", + "$defs": { + "record" : { + "oneOf" : [{ + "allOf" : [ + { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord"}}} + ]}, + { + "allOf" : [ + { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$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 0000000..2dda0fd --- /dev/null +++ b/103705/examples/example5/csp_results.json @@ -0,0 +1,49 @@ +{ + "recordSetDescription": { + "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", + "etsiSpecificationVersion": "0.3.0", + "cspSchemaId" : "csp.example_1", + "cspSchemaVersion" : "1.0.0", + "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", + "queryReference": "LDID", + "created": "2024-04-25T09:31:56.000000Z" + }, + "recordSet": [ + { + "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", + "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord", + "timeBegin": "2024-04-20T10:04:00.000000Z", + "timeEnd": "2024-04-20T10:05:00.000000Z", + "endReason": 16, + "parties": [ + { + "identity": {"mSISDN": "491713920067"}, + "role": "originating" + }, + { + "identity": {"mSISDN": "441632960123"}, + "role": "terminating" + } + ] + }, + { + "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", + "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord", + "timeBegin": "2024-04-18T10:04:00.000000Z", + "parties": [ + { + "identity": {"mSISDN": "441632960123"}, + "role": "sender" + }, + { + "identity": {"mSISDN": "491713920067"}, + "role": "receiver" + } + ] + } + ], + "signature" : { + "protected": "...", + "signature": "..." +} +} \ No newline at end of file diff --git a/103705/examples/example5/description.txt b/103705/examples/example5/description.txt new file mode 100644 index 0000000..1e567ac --- /dev/null +++ b/103705/examples/example5/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/schema/response.schema.json b/103705/schema/response.schema.json index 2ab1fbf..c9c2841 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -10,6 +10,9 @@ }, "recordSet": { "$ref": "#/$defs/recordSet" + }, + "signature": { + "$ref" : "#/$defs/Signature" } }, "required": [ @@ -99,6 +102,20 @@ "id", "type" ] + }, + "Signature": { + "properties": { + "protected": { + "type": "string" + }, + "signature": { + "type": "string" + } + }, + "required": [ + "protected", + "signature" + ] } } } \ No newline at end of file -- GitLab From 6c287f320ad2352cd211e2dfe2990d97357ed09e Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 20 Jun 2024 19:59:22 +0100 Subject: [PATCH 27/41] Removing Radius, Azimuth and StreetAddress to match latest draft --- 103705/schema/etsi_types.schema.json | 49 ---------------------------- 1 file changed, 49 deletions(-) diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index 073539c..5ebebb3 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -407,18 +407,9 @@ "modemMAC": { "$ref": "ts_103280_2017_07#/$defs/MACAddress" }, - "streetAddress": { - "$ref": "#/$defs/StreetAddress" - }, "coord": { "$ref": "ts_103280_2017_07#/$defs/WGS84CoordinateDecimal" }, - "radius": { - "$ref": "#/$defs/Radius" - }, - "azimuth": { - "$ref": "#/$defs/Azimuth" - }, "coordPolygon": { "type": "array", "items": { @@ -426,46 +417,6 @@ } } } - }, - "Radius": { - "type": "integer", - "minimum": 1, - "description": "Radius in meters // maybe move to TS 103 280" - }, - "Azimuth": { - "type": "integer", - "minimum": 0, - "exclusiveMaximum": 360, - "description": "Degrees; 0 = north, 90 = east // maybe move to TS 103 280" - }, - "StreetAddress": { - "type": "object", - "properties": { - "country": { - "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" - }, - "state": { - "type": "string" - }, - "province": { - "type": "string" - }, - "city": { - "type": "string" - }, - "street": { - "type": "string" - }, - "number": { - "type": "string" - }, - "numberExtension": { - "type": "string" - }, - "zip": { - "type": "string" - } - } } } } -- GitLab From bba850582c7640468976bdaa9d5e7b0c451bc08b Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 20 Jun 2024 20:13:09 +0100 Subject: [PATCH 28/41] Adding signature example --- 103705/examples/example5/csp_results.json | 28 +++++++++++++++-------- 103705/schema/response.schema.json | 2 +- presigned.json | 1 + 3 files changed, 20 insertions(+), 11 deletions(-) create mode 100644 presigned.json diff --git a/103705/examples/example5/csp_results.json b/103705/examples/example5/csp_results.json index 2dda0fd..87cee5b 100644 --- a/103705/examples/example5/csp_results.json +++ b/103705/examples/example5/csp_results.json @@ -2,8 +2,8 @@ "recordSetDescription": { "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", "etsiSpecificationVersion": "0.3.0", - "cspSchemaId" : "csp.example_1", - "cspSchemaVersion" : "1.0.0", + "cspSchemaId": "csp.example_1", + "cspSchemaVersion": "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" @@ -17,11 +17,15 @@ "endReason": 16, "parties": [ { - "identity": {"mSISDN": "491713920067"}, + "identity": { + "mSISDN": "491713920067" + }, "role": "originating" }, { - "identity": {"mSISDN": "441632960123"}, + "identity": { + "mSISDN": "441632960123" + }, "role": "terminating" } ] @@ -32,18 +36,22 @@ "timeBegin": "2024-04-18T10:04:00.000000Z", "parties": [ { - "identity": {"mSISDN": "441632960123"}, + "identity": { + "mSISDN": "441632960123" + }, "role": "sender" }, { - "identity": {"mSISDN": "491713920067"}, + "identity": { + "mSISDN": "491713920067" + }, "role": "receiver" } ] } ], - "signature" : { - "protected": "...", - "signature": "..." -} + "Signature": { + "protected": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9", + "signature": "QI5I6VcMR4BkBWpcW4uoGclZJKTl8_iWr3VqLaYTyoQ" + } } \ No newline at end of file diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json index c9c2841..6a39681 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -11,7 +11,7 @@ "recordSet": { "$ref": "#/$defs/recordSet" }, - "signature": { + "Signature": { "$ref" : "#/$defs/Signature" } }, diff --git a/presigned.json b/presigned.json new file mode 100644 index 0000000..972ac20 --- /dev/null +++ b/presigned.json @@ -0,0 +1 @@ +{"recordSetDescription": {"etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", "etsiSpecificationVersion": "0.3.0", "cspSchemaId": "csp.example_1", "cspSchemaVersion": "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z"}, "recordSet": [{"id": "3da91ade-f526-4e55-b5da-0c8178f25c24", "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, "parties": [{"identity": {"mSISDN": "491713920067"}, "role": "originating"}, {"identity": {"mSISDN": "441632960123"}, "role": "terminating"}]}, {"id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord", "timeBegin": "2024-04-18T10:04:00.000000Z", "parties": [{"identity": {"mSISDN": "441632960123"}, "role": "sender"}, {"identity": {"mSISDN": "491713920067"}, "role": "receiver"}]}], "Signature": {"protected": "", "signature": ""}} \ No newline at end of file -- GitLab From 5c38bcc1db4b9ab9ff7083273f117f447eda062d Mon Sep 17 00:00:00 2001 From: mark Date: Thu, 20 Jun 2024 20:13:29 +0100 Subject: [PATCH 29/41] Removing temp file --- presigned.json | 1 - 1 file changed, 1 deletion(-) delete mode 100644 presigned.json diff --git a/presigned.json b/presigned.json deleted file mode 100644 index 972ac20..0000000 --- a/presigned.json +++ /dev/null @@ -1 +0,0 @@ -{"recordSetDescription": {"etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", "etsiSpecificationVersion": "0.3.0", "cspSchemaId": "csp.example_1", "cspSchemaVersion": "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z"}, "recordSet": [{"id": "3da91ade-f526-4e55-b5da-0c8178f25c24", "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, "parties": [{"identity": {"mSISDN": "491713920067"}, "role": "originating"}, {"identity": {"mSISDN": "441632960123"}, "role": "terminating"}]}, {"id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord", "timeBegin": "2024-04-18T10:04:00.000000Z", "parties": [{"identity": {"mSISDN": "441632960123"}, "role": "sender"}, {"identity": {"mSISDN": "491713920067"}, "role": "receiver"}]}], "Signature": {"protected": "", "signature": ""}} \ No newline at end of file -- GitLab From 40246bdecdeed186b33239eb32037f3c589aee93 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 25 Jun 2024 17:07:32 +0100 Subject: [PATCH 30/41] Fixing typo --- 103705/schema/response.schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json index 6a39681..a473533 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -30,11 +30,11 @@ "$ref": "#/$defs/schemaId" }, "etsiSpecificationVersion": { - "description" : "Version of ETSI TS 103 705 usd by the Response (see clause 5.2.3)", + "description" : "Version of ETSI TS 103 705 used by the Response (see clause 5.2.3)", "$ref": "#/$defs/version" }, "cspSchemaId" : { - "description" : "ID of CSP Record Schema usd by the Response (see clause 5.2.4)", + "description" : "ID of CSP Record Schema used by the Response (see clause 5.2.4)", "$ref": "#/$defs/schemaId" }, "cspSchemaVersion" : { -- GitLab From 57284b4ceb270a0bc27a1011b6a1950db2f7365b Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 25 Jun 2024 17:19:04 +0100 Subject: [PATCH 31/41] Updating schema ids --- 103705/examples/example1/csp_records.schema.json | 10 +++++----- 103705/examples/example1/csp_results.json | 6 +++--- 103705/examples/example2/csp_records.schema.json | 6 +++--- 103705/examples/example2/csp_results.json | 4 ++-- 103705/examples/example2/csp_types.schema.json | 2 +- 103705/examples/example3/csp_records.schema.json | 6 +++--- 103705/examples/example3/csp_results.json | 4 ++-- 103705/examples/example3/csp_types.schema.json | 2 +- 103705/examples/example4/csp_records.schema.json | 2 +- 103705/examples/example4/csp_results.json | 2 +- 103705/examples/example4/csp_types.schema.json | 8 ++++---- 103705/examples/example5/csp_records.schema.json | 10 +++++----- 103705/examples/example5/csp_results.json | 6 +++--- 103705/schema/etsi_types.schema.json | 2 +- 103705/schema/records.schema.json | 6 +++--- 103705/schema/response.schema.json | 4 ++-- 16 files changed, 40 insertions(+), 40 deletions(-) diff --git a/103705/examples/example1/csp_records.schema.json b/103705/examples/example1/csp_records.schema.json index 8668141..2b8349f 100644 --- a/103705/examples/example1/csp_records.schema.json +++ b/103705/examples/example1/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", + "$id": "urn:etsi:li:103705:record-schema-id:v1", "$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)", @@ -10,13 +10,13 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord"}}} + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord"}}} ]}, { "allOf" : [ - { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord"}}} + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord"}}} ]} ] } diff --git a/103705/examples/example1/csp_results.json b/103705/examples/example1/csp_results.json index 3fc4da3..007483b 100644 --- a/103705/examples/example1/csp_results.json +++ b/103705/examples/example1/csp_results.json @@ -1,6 +1,6 @@ { "recordSetDescription": { - "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", "etsiSpecificationVersion": "0.3.0", "cspSchemaId" : "csp.example_1", "cspSchemaVersion" : "1.0.0", @@ -11,7 +11,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord", + "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, @@ -28,7 +28,7 @@ }, { "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", - "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord", + "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord", "timeBegin": "2024-04-18T10:04:00.000000Z", "parties": [ { diff --git a/103705/examples/example2/csp_records.schema.json b/103705/examples/example2/csp_records.schema.json index 1cd1c89..f931a87 100644 --- a/103705/examples/example2/csp_records.schema.json +++ b/103705/examples/example2/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", + "$id": "urn:etsi:li:103705:record-schema-id:v1", "$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)", @@ -10,8 +10,8 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord"}}} + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord"}}} ]}, { "allOf" : [ diff --git a/103705/examples/example2/csp_results.json b/103705/examples/example2/csp_results.json index cdfe149..8ad9b31 100644 --- a/103705/examples/example2/csp_results.json +++ b/103705/examples/example2/csp_results.json @@ -1,6 +1,6 @@ { "recordSetDescription": { - "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", "etsiSpecificationVersion": "0.3.0", "cspSchemaId" : "csp.example_2", "cspSchemaVersion" : "1.0.0", @@ -11,7 +11,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord", + "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, diff --git a/103705/examples/example2/csp_types.schema.json b/103705/examples/example2/csp_types.schema.json index 7f2cca7..f00dd6f 100644 --- a/103705/examples/example2/csp_types.schema.json +++ b/103705/examples/example2/csp_types.schema.json @@ -5,7 +5,7 @@ "description": "JSON schema for ETSI-defined types (see clause 6.1 and Annex A)", "$defs": { "CSPMessagingRecord" : { - "allOf" : [{ "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord"}], + "allOf" : [{ "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord"}], "properties" : { "CSPMessagingReference" : { "$ref" : "ts_103280_2017_07#/$defs/UUID"} } diff --git a/103705/examples/example3/csp_records.schema.json b/103705/examples/example3/csp_records.schema.json index 1194dc5..235be50 100644 --- a/103705/examples/example3/csp_records.schema.json +++ b/103705/examples/example3/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", + "$id": "urn:etsi:li:103705:record-schema-id:v1", "$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)", @@ -10,8 +10,8 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord"}}} + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord"}}} ]}, { "allOf" : [ diff --git a/103705/examples/example3/csp_results.json b/103705/examples/example3/csp_results.json index a2fa1d7..09a9b50 100644 --- a/103705/examples/example3/csp_results.json +++ b/103705/examples/example3/csp_results.json @@ -1,6 +1,6 @@ { "recordSetDescription": { - "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", "etsiSpecificationVersion": "0.3.0", "cspSchemaId" : "csp.example_3", "cspSchemaVersion" : "1.0.0", @@ -11,7 +11,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord", + "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, diff --git a/103705/examples/example3/csp_types.schema.json b/103705/examples/example3/csp_types.schema.json index c54042c..a4da367 100644 --- a/103705/examples/example3/csp_types.schema.json +++ b/103705/examples/example3/csp_types.schema.json @@ -15,7 +15,7 @@ }, "dataVolumeUsed" : { "description" : "A data volume associated with this service record (using an ETSI TS 103 705 type) ", - "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/DataVolume" + "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/DataVolume" }, "numberOfService" : { "description" : "Some number associated with this service record (using a native JSON type)", diff --git a/103705/examples/example4/csp_records.schema.json b/103705/examples/example4/csp_records.schema.json index 7503f36..edbb103 100644 --- a/103705/examples/example4/csp_records.schema.json +++ b/103705/examples/example4/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", + "$id": "urn:etsi:li:103705:record-schema-id:v1", "$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)", diff --git a/103705/examples/example4/csp_results.json b/103705/examples/example4/csp_results.json index cf1c20a..4fcdb58 100644 --- a/103705/examples/example4/csp_results.json +++ b/103705/examples/example4/csp_results.json @@ -1,6 +1,6 @@ { "recordSetDescription": { - "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", "etsiSpecificationVersion": "0.3.0", "cspSchemaId" : "csp.example_4", "cspSchemaVersion" : "1.0.0", diff --git a/103705/examples/example4/csp_types.schema.json b/103705/examples/example4/csp_types.schema.json index d845c24..33fb9e3 100644 --- a/103705/examples/example4/csp_types.schema.json +++ b/103705/examples/example4/csp_types.schema.json @@ -15,19 +15,19 @@ }, "registeredAddress" : { "description" : "Points to the address registered as part of the service", - "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/Pointer" + "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/Pointer" }, "deliveryAddress" : { "description" : "Points to the address used for delivery", - "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/Pointer" + "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/Pointer" }, "billingAddress" : { "description" : "Points to the address used for billing", - "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/Pointer" + "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/Pointer" }, "contactAddress" : { "description" : "Points to the address used for mailing purposes", - "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/Pointer" + "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/Pointer" } } }, diff --git a/103705/examples/example5/csp_records.schema.json b/103705/examples/example5/csp_records.schema.json index b569878..763c0e9 100644 --- a/103705/examples/example5/csp_records.schema.json +++ b/103705/examples/example5/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", + "$id": "urn:etsi:li:103705:record-schema-id:v1", "$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)", @@ -10,13 +10,13 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord"}}} + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord"}}} ]}, { "allOf" : [ - { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord"}}} + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord"}}} ]} ] } diff --git a/103705/examples/example5/csp_results.json b/103705/examples/example5/csp_results.json index 87cee5b..28ca72e 100644 --- a/103705/examples/example5/csp_results.json +++ b/103705/examples/example5/csp_results.json @@ -1,6 +1,6 @@ { "recordSetDescription": { - "etsiSchemaId": "urn:etsi:li:ts103705_schema_id:0.3.0", + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", "etsiSpecificationVersion": "0.3.0", "cspSchemaId": "csp.example_1", "cspSchemaVersion": "1.0.0", @@ -11,7 +11,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord", + "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord", "timeBegin": "2024-04-20T10:04:00.000000Z", "timeEnd": "2024-04-20T10:05:00.000000Z", "endReason": 16, @@ -32,7 +32,7 @@ }, { "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", - "type": "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/MessagingRecord", + "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord", "timeBegin": "2024-04-18T10:04:00.000000Z", "parties": [ { diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index 5ebebb3..144f8da 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:ts103705_type_schema_id:0.3.0", + "$id": "urn:etsi:li:103705:type-schema-id:v1", "$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)", diff --git a/103705/schema/records.schema.json b/103705/schema/records.schema.json index 58ac74b..c61f813 100644 --- a/103705/schema/records.schema.json +++ b/103705/schema/records.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:ts103705_record_schema_id:0.3.0", + "$id": "urn:etsi:li:103705:record-schema-id:v1", "$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)", @@ -12,8 +12,8 @@ { "$comment" : "This is an example", "allOf" : [ - { "$ref" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:ts103705_type_schema_id:0.3.0#/$defs/CallRecord"}}} + { "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord" }, + { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord"}}} ] } ] diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json index a473533..c8a1919 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:ts103705_schema_id:0.3.0", + "$id": "urn:etsi:li:103705:response-schema-id:v1", "$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 query (see clause 5)", @@ -83,7 +83,7 @@ } }, "record": { - "allOf" : [{ "$ref" : "urn:etsi:li:ts103705_record_schema_id:0.3.0#/$defs/record"}], + "allOf" : [{ "$ref" : "urn:etsi:li:103705:record-schema-id:v1#/$defs/record"}], "type": "object", "title": "Record", "description": "Response record (see clause 5.3)", -- GitLab From fbf942e5ef42969f8d020632f578bc9e2d3caf44 Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 5 Jul 2024 08:48:11 +0100 Subject: [PATCH 32/41] Updating schema post NL meeting --- 103705/examples/example1/csp_results.json | 6 +-- 103705/examples/example2/csp_results.json | 6 +-- 103705/examples/example3/csp_results.json | 4 +- 103705/examples/example5/csp_results.json | 58 +---------------------- 103705/examples/example5/description.txt | 2 +- 103705/schema/etsi_types.schema.json | 18 ++++--- 6 files changed, 18 insertions(+), 76 deletions(-) diff --git a/103705/examples/example1/csp_results.json b/103705/examples/example1/csp_results.json index 007483b..55bce43 100644 --- a/103705/examples/example1/csp_results.json +++ b/103705/examples/example1/csp_results.json @@ -17,11 +17,11 @@ "endReason": 16, "parties": [ { - "identity": {"mSISDN": "491713920067"}, + "identity": {"phoneNumber": "491713920067"}, "role": "originating" }, { - "identity": {"mSISDN": "441632960123"}, + "identity": {"phoneNumber": "441632960123"}, "role": "terminating" } ] @@ -29,7 +29,7 @@ { "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord", - "timeBegin": "2024-04-18T10:04:00.000000Z", + "eventTime": "2024-04-18T10:04:00.000000Z", "parties": [ { "identity": {"mSISDN": "441632960123"}, diff --git a/103705/examples/example2/csp_results.json b/103705/examples/example2/csp_results.json index 8ad9b31..088c60d 100644 --- a/103705/examples/example2/csp_results.json +++ b/103705/examples/example2/csp_results.json @@ -17,11 +17,11 @@ "endReason": 16, "parties": [ { - "identity": {"mSISDN": "491713920067"}, + "identity": {"phoneNumber": "491713920067"}, "role": "originating" }, { - "identity": {"mSISDN": "441632960123"}, + "identity": {"phoneNumber": "441632960123"}, "role": "terminating" } ] @@ -29,7 +29,7 @@ { "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", "type": "csp_example_types#/$defs/CSPMessagingRecord", - "timeBegin": "2024-04-18T10:04:00.000000Z", + "eventTime": "2024-04-18T10:04:00.000000Z", "parties": [ { "identity": {"mSISDN": "441632960123"}, diff --git a/103705/examples/example3/csp_results.json b/103705/examples/example3/csp_results.json index 09a9b50..9ba1073 100644 --- a/103705/examples/example3/csp_results.json +++ b/103705/examples/example3/csp_results.json @@ -17,11 +17,11 @@ "endReason": 16, "parties": [ { - "identity": {"mSISDN": "491713920067"}, + "identity": {"phoneNumber": "491713920067"}, "role": "originating" }, { - "identity": {"mSISDN": "441632960123"}, + "identity": {"phoneNumber": "441632960123"}, "role": "terminating" } ] diff --git a/103705/examples/example5/csp_results.json b/103705/examples/example5/csp_results.json index 28ca72e..532105f 100644 --- a/103705/examples/example5/csp_results.json +++ b/103705/examples/example5/csp_results.json @@ -1,57 +1 @@ -{ - "recordSetDescription": { - "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", - "etsiSpecificationVersion": "0.3.0", - "cspSchemaId": "csp.example_1", - "cspSchemaVersion": "1.0.0", - "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", - "queryReference": "LDID", - "created": "2024-04-25T09:31:56.000000Z" - }, - "recordSet": [ - { - "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord", - "timeBegin": "2024-04-20T10:04:00.000000Z", - "timeEnd": "2024-04-20T10:05:00.000000Z", - "endReason": 16, - "parties": [ - { - "identity": { - "mSISDN": "491713920067" - }, - "role": "originating" - }, - { - "identity": { - "mSISDN": "441632960123" - }, - "role": "terminating" - } - ] - }, - { - "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", - "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord", - "timeBegin": "2024-04-18T10:04:00.000000Z", - "parties": [ - { - "identity": { - "mSISDN": "441632960123" - }, - "role": "sender" - }, - { - "identity": { - "mSISDN": "491713920067" - }, - "role": "receiver" - } - ] - } - ], - "Signature": { - "protected": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9", - "signature": "QI5I6VcMR4BkBWpcW4uoGclZJKTl8_iWr3VqLaYTyoQ" - } -} \ No newline at end of file +{"recordSetDescription": {"etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", "etsiSpecificationVersion": "0.3.0", "cspSchemaId": "csp.example_1", "cspSchemaVersion": "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z"}, "recordSet": [{"id": "3da91ade-f526-4e55-b5da-0c8178f25c24", "type": "urn:etsi:li:103705:type-schema-id:v1#/$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#/$defs/MessagingRecord", "eventTime": "2024-04-18T10:04:00.000000Z", "parties": [{"identity": {"mSISDN": "441632960123"}, "role": "sender"}, {"identity": {"mSISDN": "491713920067"}, "role": "receiver"}]}], "Signature": {"protected": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9", "signature": "yvPyjRDAS7dSld9inyVfLpz02En47_AMq0J8cP82BCU"}} diff --git a/103705/examples/example5/description.txt b/103705/examples/example5/description.txt index 1e567ac..9e8da6b 100644 --- a/103705/examples/example5/description.txt +++ b/103705/examples/example5/description.txt @@ -1,4 +1,4 @@ -CSP elects to use only ETSI-standard types in their responses +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 diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index 144f8da..e15301e 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -29,7 +29,7 @@ "title": "Information about call details", "description": "Details about a record or event related to a call", "required": [ - "timeBegin" + "timeBegin", "parties" ], "properties": { "sessionRefId": { @@ -61,10 +61,6 @@ "endReason": { "type": "integer", "description": "ITU Q.850" - }, - "bearer": { - "$ref": "#/$defs/Bearer", - "description": "In case one set of bearer information is availble" } } }, @@ -73,7 +69,7 @@ "title": "Information about messaging details", "description": "Details about a record or event related to a message", "required": [ - "timeBegin" + "eventTime", "parties" ], "properties": { "sessionRefId": { @@ -97,7 +93,7 @@ "title": "Information about email details", "description": "Details about a record or event related to an email", "required": [ - "timeBegin" + "eventTime", "parties" ], "properties": { "sessionRefId": { @@ -121,7 +117,7 @@ "title": "Data Record", "description": "Information about a data access session (e.g. a mobile data session)", "required": [ - "timeBegin" + "timeBegin", "parties" ], "properties": { "sessionRefId": { @@ -253,7 +249,7 @@ "type": "object", "description": "Identifier of the party related to the call", "properties": { - "mSISDN": { + "phoneNumber": { "$ref": "ts_103280_2017_07#/$defs/InternationalE164" }, "iMSI": { @@ -384,7 +380,9 @@ "5G", "fiber", "cable", - "wifi" + "wifi", + "xDSL", + "pstn" ], "description": "The technology used;" } -- GitLab From 46b07c69a611e58ec77ba798e6850ec3f9d6c434 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 9 Jul 2024 07:52:29 +0100 Subject: [PATCH 33/41] Updating APN and DNN to use TS 103280 --- 103705/schema/etsi_types.schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index e15301e..d98772a 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -228,10 +228,10 @@ "$ref": "#/$defs/DataPartyId" }, "aPN": { - "type": "string" + "type": "s_103280_2017_07#/$defs/APN" }, "dNN": { - "type": "string" + "type": "s_103280_2017_07#/$defs/DNN" }, "bearer": { "$ref": "#/$defs/Bearer", -- GitLab From affcd65cd18ebc8beef3cafb9a708bba3c64642e Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 10 Jul 2024 10:21:40 +0100 Subject: [PATCH 34/41] Replacing 'query' with 'request' --- 103705/examples/example1/csp_results.json | 2 +- 103705/examples/example2/csp_results.json | 2 +- 103705/examples/example3/csp_results.json | 2 +- 103705/examples/example4/csp_results.json | 2 +- 103705/examples/example4/description.txt | 4 ++++ 103705/examples/example5/csp_results.json | 2 +- 103705/schema/response.schema.json | 10 +++++----- 7 files changed, 14 insertions(+), 10 deletions(-) diff --git a/103705/examples/example1/csp_results.json b/103705/examples/example1/csp_results.json index 55bce43..1b03bfd 100644 --- a/103705/examples/example1/csp_results.json +++ b/103705/examples/example1/csp_results.json @@ -5,7 +5,7 @@ "cspSchemaId" : "csp.example_1", "cspSchemaVersion" : "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", - "queryReference": "LDID", + "requestReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" }, "recordSet": [ diff --git a/103705/examples/example2/csp_results.json b/103705/examples/example2/csp_results.json index 088c60d..10b058d 100644 --- a/103705/examples/example2/csp_results.json +++ b/103705/examples/example2/csp_results.json @@ -5,7 +5,7 @@ "cspSchemaId" : "csp.example_2", "cspSchemaVersion" : "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", - "queryReference": "LDID", + "requestReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" }, "recordSet": [ diff --git a/103705/examples/example3/csp_results.json b/103705/examples/example3/csp_results.json index 9ba1073..c6f2589 100644 --- a/103705/examples/example3/csp_results.json +++ b/103705/examples/example3/csp_results.json @@ -5,7 +5,7 @@ "cspSchemaId" : "csp.example_3", "cspSchemaVersion" : "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", - "queryReference": "LDID", + "requestReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" }, "recordSet": [ diff --git a/103705/examples/example4/csp_results.json b/103705/examples/example4/csp_results.json index 4fcdb58..483508e 100644 --- a/103705/examples/example4/csp_results.json +++ b/103705/examples/example4/csp_results.json @@ -5,7 +5,7 @@ "cspSchemaId" : "csp.example_4", "cspSchemaVersion" : "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", - "queryReference": "LDID", + "requestReference": "LDID", "created": "2024-04-25T09:31:56.000000Z" }, "recordSet": [ diff --git a/103705/examples/example4/description.txt b/103705/examples/example4/description.txt index b4169d5..ae4259c 100644 --- a/103705/examples/example4/description.txt +++ b/103705/examples/example4/description.txt @@ -6,3 +6,7 @@ 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_results.json b/103705/examples/example5/csp_results.json index 532105f..240b9ff 100644 --- a/103705/examples/example5/csp_results.json +++ b/103705/examples/example5/csp_results.json @@ -1 +1 @@ -{"recordSetDescription": {"etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", "etsiSpecificationVersion": "0.3.0", "cspSchemaId": "csp.example_1", "cspSchemaVersion": "1.0.0", "resultSetId": "9a25db0c-d0f3-4ae5-b618-bd1a9a0056c2", "queryReference": "LDID", "created": "2024-04-25T09:31:56.000000Z"}, "recordSet": [{"id": "3da91ade-f526-4e55-b5da-0c8178f25c24", "type": "urn:etsi:li:103705:type-schema-id:v1#/$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#/$defs/MessagingRecord", "eventTime": "2024-04-18T10:04:00.000000Z", "parties": [{"identity": {"mSISDN": "441632960123"}, "role": "sender"}, {"identity": {"mSISDN": "491713920067"}, "role": "receiver"}]}], "Signature": {"protected": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9", "signature": "yvPyjRDAS7dSld9inyVfLpz02En47_AMq0J8cP82BCU"}} +{"recordSetDescription": {"etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", "etsiSpecificationVersion": "0.3.0", "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#/$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#/$defs/MessagingRecord", "eventTime": "2024-04-18T10:04:00.000000Z", "parties": [{"identity": {"mSISDN": "441632960123"}, "role": "sender"}, {"identity": {"mSISDN": "491713920067"}, "role": "receiver"}]}], "Signature": {"protected": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9", "signature": "yvPyjRDAS7dSld9inyVfLpz02En47_AMq0J8cP82BCU"}} diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json index c8a1919..27511b0 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -2,7 +2,7 @@ "$id": "urn:etsi:li:103705:response-schema-id:v1", "$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 query (see clause 5)", + "description": "Overall Response structure, representing the results of a lawful disclosure request (see clause 5)", "type:": "object", "properties": { "recordSetDescription": { @@ -44,8 +44,8 @@ "resultSetId": { "$ref": "#/$defs/resultSetId" }, - "queryReference": { - "$ref": "#/$defs/queryReference" + "requestReference": { + "$ref": "#/$defs/requestReference" }, "created": { "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime" @@ -57,7 +57,7 @@ "cspSchemaId", "cspSchemaVersion", "resultSetId", - "queryReference", + "requestReference", "created" ] }, @@ -71,7 +71,7 @@ "resultSetId": { "type": "string" }, - "queryReference": { + "requestReference": { "type": "string" }, "recordSet": { -- GitLab From f1cb00169a78d8551096749c0489fd8aafa7ef2a Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 10 Jul 2024 10:42:07 +0100 Subject: [PATCH 35/41] Updating description of Location --- 103705/schema/etsi_types.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index d98772a..afc2ef5 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -391,7 +391,7 @@ }, "Location": { "type": "object", - "description": "Location information of the party", + "description": "Location information", "properties": { "cGI": { "$ref": "ts_103280_2017_07#/$defs/CGI" -- GitLab From 786edb13770cfb56a3930ae4fe871f13c200dec6 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 10 Jul 2024 12:47:42 +0100 Subject: [PATCH 36/41] Updating versions to match document --- 103705/examples/example1/csp_records.schema.json | 8 ++++---- 103705/examples/example1/csp_results.json | 6 +++--- 103705/examples/example2/csp_records.schema.json | 4 ++-- 103705/examples/example2/csp_results.json | 4 ++-- 103705/examples/example2/csp_types.schema.json | 2 +- 103705/examples/example3/csp_records.schema.json | 4 ++-- 103705/examples/example3/csp_results.json | 4 ++-- 103705/examples/example3/csp_types.schema.json | 2 +- 103705/examples/example4/csp_results.json | 2 +- 103705/examples/example4/csp_types.schema.json | 8 ++++---- 103705/examples/example5/csp_records.schema.json | 8 ++++---- 103705/examples/example5/csp_results.json | 2 +- 103705/schema/etsi_types.schema.json | 2 +- 103705/schema/records.schema.json | 4 ++-- 103705/schema/response.schema.json | 2 +- 15 files changed, 31 insertions(+), 31 deletions(-) diff --git a/103705/examples/example1/csp_records.schema.json b/103705/examples/example1/csp_records.schema.json index 2b8349f..53e719a 100644 --- a/103705/examples/example1/csp_records.schema.json +++ b/103705/examples/example1/csp_records.schema.json @@ -10,13 +10,13 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord"}}} + { "$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#/$defs/MessagingRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord"}}} + { "$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"}}} ]} ] } diff --git a/103705/examples/example1/csp_results.json b/103705/examples/example1/csp_results.json index 1b03bfd..ae4da66 100644 --- a/103705/examples/example1/csp_results.json +++ b/103705/examples/example1/csp_results.json @@ -1,6 +1,6 @@ { "recordSetDescription": { - "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1.1.1", "etsiSpecificationVersion": "0.3.0", "cspSchemaId" : "csp.example_1", "cspSchemaVersion" : "1.0.0", @@ -11,7 +11,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord", + "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, @@ -28,7 +28,7 @@ }, { "id": "8be3fc6b-a2dd-4104-9af1-d6b1f70081a0", - "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord", + "type": "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/MessagingRecord", "eventTime": "2024-04-18T10:04:00.000000Z", "parties": [ { diff --git a/103705/examples/example2/csp_records.schema.json b/103705/examples/example2/csp_records.schema.json index f931a87..6f3fc6d 100644 --- a/103705/examples/example2/csp_records.schema.json +++ b/103705/examples/example2/csp_records.schema.json @@ -10,8 +10,8 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord"}}} + { "$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" : [ diff --git a/103705/examples/example2/csp_results.json b/103705/examples/example2/csp_results.json index 10b058d..31daddc 100644 --- a/103705/examples/example2/csp_results.json +++ b/103705/examples/example2/csp_results.json @@ -1,6 +1,6 @@ { "recordSetDescription": { - "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1.1.1", "etsiSpecificationVersion": "0.3.0", "cspSchemaId" : "csp.example_2", "cspSchemaVersion" : "1.0.0", @@ -11,7 +11,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord", + "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, diff --git a/103705/examples/example2/csp_types.schema.json b/103705/examples/example2/csp_types.schema.json index f00dd6f..4cf437d 100644 --- a/103705/examples/example2/csp_types.schema.json +++ b/103705/examples/example2/csp_types.schema.json @@ -5,7 +5,7 @@ "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#/$defs/MessagingRecord"}], + "allOf" : [{ "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/MessagingRecord"}], "properties" : { "CSPMessagingReference" : { "$ref" : "ts_103280_2017_07#/$defs/UUID"} } diff --git a/103705/examples/example3/csp_records.schema.json b/103705/examples/example3/csp_records.schema.json index 235be50..4ddbfb6 100644 --- a/103705/examples/example3/csp_records.schema.json +++ b/103705/examples/example3/csp_records.schema.json @@ -10,8 +10,8 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord"}}} + { "$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" : [ diff --git a/103705/examples/example3/csp_results.json b/103705/examples/example3/csp_results.json index c6f2589..6d70bfa 100644 --- a/103705/examples/example3/csp_results.json +++ b/103705/examples/example3/csp_results.json @@ -1,6 +1,6 @@ { "recordSetDescription": { - "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1.1.1", "etsiSpecificationVersion": "0.3.0", "cspSchemaId" : "csp.example_3", "cspSchemaVersion" : "1.0.0", @@ -11,7 +11,7 @@ "recordSet": [ { "id": "3da91ade-f526-4e55-b5da-0c8178f25c24", - "type": "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord", + "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, diff --git a/103705/examples/example3/csp_types.schema.json b/103705/examples/example3/csp_types.schema.json index a4da367..fde0bf8 100644 --- a/103705/examples/example3/csp_types.schema.json +++ b/103705/examples/example3/csp_types.schema.json @@ -15,7 +15,7 @@ }, "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#/$defs/DataVolume" + "$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)", diff --git a/103705/examples/example4/csp_results.json b/103705/examples/example4/csp_results.json index 483508e..badb4ba 100644 --- a/103705/examples/example4/csp_results.json +++ b/103705/examples/example4/csp_results.json @@ -1,6 +1,6 @@ { "recordSetDescription": { - "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", + "etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1.1.1", "etsiSpecificationVersion": "0.3.0", "cspSchemaId" : "csp.example_4", "cspSchemaVersion" : "1.0.0", diff --git a/103705/examples/example4/csp_types.schema.json b/103705/examples/example4/csp_types.schema.json index 33fb9e3..8fee961 100644 --- a/103705/examples/example4/csp_types.schema.json +++ b/103705/examples/example4/csp_types.schema.json @@ -15,19 +15,19 @@ }, "registeredAddress" : { "description" : "Points to the address registered as part of the service", - "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/Pointer" + "$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#/$defs/Pointer" + "$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#/$defs/Pointer" + "$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#/$defs/Pointer" + "$ref" : "urn:etsi:li:103705:type-schema-id:v1.1.1#/$defs/Pointer" } } }, diff --git a/103705/examples/example5/csp_records.schema.json b/103705/examples/example5/csp_records.schema.json index 763c0e9..c905dc0 100644 --- a/103705/examples/example5/csp_records.schema.json +++ b/103705/examples/example5/csp_records.schema.json @@ -10,13 +10,13 @@ "record" : { "oneOf" : [{ "allOf" : [ - { "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord"}}} + { "$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#/$defs/MessagingRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/MessagingRecord"}}} + { "$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"}}} ]} ] } diff --git a/103705/examples/example5/csp_results.json b/103705/examples/example5/csp_results.json index 240b9ff..0df7529 100644 --- a/103705/examples/example5/csp_results.json +++ b/103705/examples/example5/csp_results.json @@ -1 +1 @@ -{"recordSetDescription": {"etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1", "etsiSpecificationVersion": "0.3.0", "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#/$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#/$defs/MessagingRecord", "eventTime": "2024-04-18T10:04:00.000000Z", "parties": [{"identity": {"mSISDN": "441632960123"}, "role": "sender"}, {"identity": {"mSISDN": "491713920067"}, "role": "receiver"}]}], "Signature": {"protected": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9", "signature": "yvPyjRDAS7dSld9inyVfLpz02En47_AMq0J8cP82BCU"}} +{"recordSetDescription": {"etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1.1.1", "etsiSpecificationVersion": "0.3.0", "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": {"mSISDN": "441632960123"}, "role": "sender"}, {"identity": {"mSISDN": "491713920067"}, "role": "receiver"}]}], "Signature": {"protected": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9", "signature": "yvPyjRDAS7dSld9inyVfLpz02En47_AMq0J8cP82BCU"}} diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index afc2ef5..654bcc3 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:103705:type-schema-id:v1", + "$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)", diff --git a/103705/schema/records.schema.json b/103705/schema/records.schema.json index c61f813..c2b2698 100644 --- a/103705/schema/records.schema.json +++ b/103705/schema/records.schema.json @@ -12,8 +12,8 @@ { "$comment" : "This is an example", "allOf" : [ - { "$ref" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord" }, - { "properties" : { "type" : { "const" : "urn:etsi:li:103705:type-schema-id:v1#/$defs/CallRecord"}}} + { "$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"}}} ] } ] diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json index 27511b0..82253f4 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:103705:response-schema-id:v1", + "$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)", -- GitLab From 99d1fee27985111eb1f5f5c363984eb5bf8b79d2 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 10 Jul 2024 12:55:56 +0100 Subject: [PATCH 37/41] Converting remaining MSISDNs to phoneNumber --- 103705/examples/example1/csp_results.json | 4 ++-- 103705/examples/example2/csp_results.json | 4 ++-- 103705/examples/example5/csp_results.json | 2 +- 103705/schema/etsi_types.schema.json | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/103705/examples/example1/csp_results.json b/103705/examples/example1/csp_results.json index ae4da66..14564f7 100644 --- a/103705/examples/example1/csp_results.json +++ b/103705/examples/example1/csp_results.json @@ -32,11 +32,11 @@ "eventTime": "2024-04-18T10:04:00.000000Z", "parties": [ { - "identity": {"mSISDN": "441632960123"}, + "identity": {"phoneNumber": "441632960123"}, "role": "sender" }, { - "identity": {"mSISDN": "491713920067"}, + "identity": {"phoneNumber": "491713920067"}, "role": "receiver" } ] diff --git a/103705/examples/example2/csp_results.json b/103705/examples/example2/csp_results.json index 31daddc..3d3ee38 100644 --- a/103705/examples/example2/csp_results.json +++ b/103705/examples/example2/csp_results.json @@ -32,11 +32,11 @@ "eventTime": "2024-04-18T10:04:00.000000Z", "parties": [ { - "identity": {"mSISDN": "441632960123"}, + "identity": {"phoneNumber": "441632960123"}, "role": "sender" }, { - "identity": {"mSISDN": "491713920067"}, + "identity": {"phoneNumber": "491713920067"}, "role": "receiver" } ], diff --git a/103705/examples/example5/csp_results.json b/103705/examples/example5/csp_results.json index 0df7529..381c13a 100644 --- a/103705/examples/example5/csp_results.json +++ b/103705/examples/example5/csp_results.json @@ -1 +1 @@ -{"recordSetDescription": {"etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1.1.1", "etsiSpecificationVersion": "0.3.0", "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": {"mSISDN": "441632960123"}, "role": "sender"}, {"identity": {"mSISDN": "491713920067"}, "role": "receiver"}]}], "Signature": {"protected": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9", "signature": "yvPyjRDAS7dSld9inyVfLpz02En47_AMq0J8cP82BCU"}} +{"recordSetDescription": {"etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1.1.1", "etsiSpecificationVersion": "0.3.0", "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/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index 654bcc3..a30a09a 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -273,7 +273,7 @@ "type": "object", "description": "Identifier of the party related to the message", "properties": { - "mSISDN": { + "phoneNumber": { "$ref": "ts_103280_2017_07#/$defs/InternationalE164" }, "iMSI": { @@ -312,7 +312,7 @@ "type": "object", "description": "Identifier of the party related to the data service", "properties": { - "mSISDN": { + "phoneNumber": { "$ref": "ts_103280_2017_07#/$defs/InternationalE164" }, "iMSI": { -- GitLab From fa658e109804cf71968d63710cd28e1f49e28365 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 10 Jul 2024 15:09:12 +0100 Subject: [PATCH 38/41] Adding cspName to schema definitions, and example results --- 103705/examples/example1/csp_results.json | 1 + 103705/examples/example2/csp_records.schema.json | 1 + 103705/examples/example2/csp_results.json | 1 + 103705/examples/example3/csp_records.schema.json | 1 + 103705/examples/example3/csp_results.json | 1 + 103705/examples/example4/csp_records.schema.json | 1 + 103705/examples/example4/csp_results.json | 1 + 103705/examples/example5/csp_results.json | 2 +- 103705/schema/response.schema.json | 11 ++++++++--- 9 files changed, 16 insertions(+), 4 deletions(-) diff --git a/103705/examples/example1/csp_results.json b/103705/examples/example1/csp_results.json index 14564f7..bc10207 100644 --- a/103705/examples/example1/csp_results.json +++ b/103705/examples/example1/csp_results.json @@ -2,6 +2,7 @@ "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", diff --git a/103705/examples/example2/csp_records.schema.json b/103705/examples/example2/csp_records.schema.json index 6f3fc6d..54a87ed 100644 --- a/103705/examples/example2/csp_records.schema.json +++ b/103705/examples/example2/csp_records.schema.json @@ -4,6 +4,7 @@ "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": { diff --git a/103705/examples/example2/csp_results.json b/103705/examples/example2/csp_results.json index 3d3ee38..c4ff7c0 100644 --- a/103705/examples/example2/csp_results.json +++ b/103705/examples/example2/csp_results.json @@ -2,6 +2,7 @@ "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", diff --git a/103705/examples/example3/csp_records.schema.json b/103705/examples/example3/csp_records.schema.json index 4ddbfb6..e233a83 100644 --- a/103705/examples/example3/csp_records.schema.json +++ b/103705/examples/example3/csp_records.schema.json @@ -4,6 +4,7 @@ "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": { diff --git a/103705/examples/example3/csp_results.json b/103705/examples/example3/csp_results.json index 6d70bfa..8f2f9ed 100644 --- a/103705/examples/example3/csp_results.json +++ b/103705/examples/example3/csp_results.json @@ -2,6 +2,7 @@ "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", diff --git a/103705/examples/example4/csp_records.schema.json b/103705/examples/example4/csp_records.schema.json index edbb103..13e2f97 100644 --- a/103705/examples/example4/csp_records.schema.json +++ b/103705/examples/example4/csp_records.schema.json @@ -4,6 +4,7 @@ "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": { diff --git a/103705/examples/example4/csp_results.json b/103705/examples/example4/csp_results.json index badb4ba..fd290b1 100644 --- a/103705/examples/example4/csp_results.json +++ b/103705/examples/example4/csp_results.json @@ -2,6 +2,7 @@ "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", diff --git a/103705/examples/example5/csp_results.json b/103705/examples/example5/csp_results.json index 381c13a..f8c81d9 100644 --- a/103705/examples/example5/csp_results.json +++ b/103705/examples/example5/csp_results.json @@ -1 +1 @@ -{"recordSetDescription": {"etsiSchemaId": "urn:etsi:li:103705:response-schema-id:v1.1.1", "etsiSpecificationVersion": "0.3.0", "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"}} +{"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/schema/response.schema.json b/103705/schema/response.schema.json index 82253f4..d7985f0 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -26,19 +26,23 @@ "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.1)", + "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.4)", + "description" : "ID of CSP Record Schema used by the Response (see clause 5.2.5)", "$ref": "#/$defs/schemaId" }, "cspSchemaVersion" : { - "description" : "the version number assigned by the CSP to the CSP Record Schema identified by the cspSchemaId (see clause 5.2.5)", + "description" : "the version number assigned by the CSP to the CSP Record Schema identified by the cspSchemaId (see clause 5.2.6)", "$ref": "#/$defs/version" }, "resultSetId": { @@ -54,6 +58,7 @@ "required": [ "etsiSchemaId", "etsiSpecificationVersion", + "cspName", "cspSchemaId", "cspSchemaVersion", "resultSetId", -- GitLab From 59bf8c5c8a1699cbac5fa254cf1553d75770b6b1 Mon Sep 17 00:00:00 2001 From: canterburym Date: Thu, 18 Jul 2024 11:40:45 +0000 Subject: [PATCH 39/41] Making changes post conference call --- .../examples/example1/csp_records.schema.json | 1 + 103705/examples/example1/csp_results.json | 3 +- 103705/schema/etsi_types.schema.json | 89 +++++++++---------- 103705/schema/records.schema.json | 9 +- 103705/schema/response.schema.json | 5 +- 5 files changed, 52 insertions(+), 55 deletions(-) diff --git a/103705/examples/example1/csp_records.schema.json b/103705/examples/example1/csp_records.schema.json index 53e719a..55d933b 100644 --- a/103705/examples/example1/csp_records.schema.json +++ b/103705/examples/example1/csp_records.schema.json @@ -4,6 +4,7 @@ "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": { diff --git a/103705/examples/example1/csp_results.json b/103705/examples/example1/csp_results.json index bc10207..52dbe6f 100644 --- a/103705/examples/example1/csp_results.json +++ b/103705/examples/example1/csp_results.json @@ -19,7 +19,8 @@ "parties": [ { "identity": {"phoneNumber": "491713920067"}, - "role": "originating" + "role": "originating", + "initialAccessTechnology" : "5G" }, { "identity": {"phoneNumber": "441632960123"}, diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index a30a09a..181b385 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -18,11 +18,11 @@ "type": "string", "title": "Relationship", "description": "Indicates the nature of the relationship. Valid values and their meaning should be provided by the CSP" - }, - "required": [ - "destination" - ] - } + } + }, + "required": [ + "destination" + ] }, "CallRecord": { "type": "object", @@ -38,11 +38,11 @@ }, "timeBegin": { "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", - "description": "Unknown fractions of the time to be filled-in with zeros" + "description": "Time at which the call began" }, "timeEnd": { "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", - "description": "Unknown fractions of the time to be filled-in with zeros" + "description": "Time at which the call ended" }, "callDuration": { "type": "integer", @@ -78,7 +78,7 @@ }, "eventTime": { "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", - "description": "Unknown fractions of the time to be filled-in with zeros" + "description": "Time at which the event happened" }, "parties": { "type": "array", @@ -102,7 +102,7 @@ }, "eventTime": { "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", - "description": "Unknown fractions of the time to be filled-in with zeros" + "description": "Time at which the event happened" }, "parties": { "type": "array", @@ -126,11 +126,11 @@ }, "timeBegin": { "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", - "description": "Unknown fractions of the time to be filled-in with zeros" + "description": "Time at which the data access session began" }, "timeEnd": { "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime", - "description": "Unknown fractions of the time to be filled-in with zeros" + "description": "Time at which the data access session ended" }, "parties": { "type": "array", @@ -158,9 +158,9 @@ "unknown" ] }, - "bearer": { - "$ref": "#/$defs/Bearer", - "description": "For bearer information specific for this party" + "initialAccessTechnology": { + "$ref": "#/$defs/AccessTechnology", + "description": "Access technology used at the start of the call" }, "locations": { "type": "array", @@ -183,9 +183,9 @@ "receiver" ] }, - "bearer": { - "$ref": "#/$defs/Bearer", - "description": "For bearer information specific for this party" + "accessTechnology": { + "$ref": "#/$defs/AccessTechnology", + "description": "Access technology used" }, "locations": { "type": "array", @@ -208,9 +208,9 @@ "receiver" ] }, - "bearer": { - "$ref": "#/$defs/Bearer", - "description": "For bearer information specific for this party" + "accessTechnology": { + "$ref": "#/$defs/AccessTechnology", + "description": "Access technology used" }, "locations": { "type": "array", @@ -225,17 +225,15 @@ "description": "Information about the participants and technologies related to the data service", "properties": { "identity": { - "$ref": "#/$defs/DataPartyId" - }, - "aPN": { - "type": "s_103280_2017_07#/$defs/APN" + "$ref": "#/$defs/DataAccessPartyId" }, - "dNN": { - "type": "s_103280_2017_07#/$defs/DNN" + "aPNdNN": { + "description" : "APN or DPN associated with the data access", + "$ref": "ts_103280_2017_07#/$defs/DNN" }, - "bearer": { - "$ref": "#/$defs/Bearer", - "description": "For bearer information specific for this party" + "initialAccessTechnology": { + "$ref": "#/$defs/AccessTechnology", + "description": "Access technology used at the start of the data access session" }, "locations": { "type": "array", @@ -368,26 +366,19 @@ } } }, - "Bearer": { - "type": "object", - "description": "The Technology used", - "properties": { - "technology": { - "enum": [ - "2G", - "3G", - "4G", - "5G", - "fiber", - "cable", - "wifi", - "xDSL", - "pstn" - ], - "description": "The technology used;" - } - - } + "AccessTechnology": { + "description": "Access technology used", + "enum": [ + "2G", + "3G", + "4G", + "5G", + "fiber", + "cable", + "wifi", + "xDSL", + "pstn" + ] }, "Location": { "type": "object", diff --git a/103705/schema/records.schema.json b/103705/schema/records.schema.json index c2b2698..ab59701 100644 --- a/103705/schema/records.schema.json +++ b/103705/schema/records.schema.json @@ -1,11 +1,12 @@ { - "$id": "urn:etsi:li:103705:record-schema-id:v1", + "$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" : "{replace with assigned ID - see TS 103 705 Table 6.2}", - "dateIssued" : "{replace with date issued - see TS 103 705 Table 6.2}", - "version" : "{Replace with version - see TS 103 705 Table 6.2}", + "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" : [ diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json index d7985f0..2529b2a 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -42,16 +42,19 @@ "$ref": "#/$defs/schemaId" }, "cspSchemaVersion" : { - "description" : "the version number assigned by the CSP to the CSP Record Schema identified by the cspSchemaId (see clause 5.2.6)", + "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" } }, -- GitLab From bf9b73554cdbb1bc16a1f50ae2586392671d4927 Mon Sep 17 00:00:00 2001 From: mark Date: Fri, 19 Jul 2024 07:52:44 +0100 Subject: [PATCH 40/41] Correcting APNDNN and schema id version --- 103705/examples/example1/csp_records.schema.json | 2 +- 103705/examples/example2/csp_records.schema.json | 2 +- 103705/examples/example3/csp_records.schema.json | 2 +- 103705/examples/example4/csp_records.schema.json | 2 +- 103705/examples/example5/csp_records.schema.json | 3 ++- 103705/schema/etsi_types.schema.json | 4 ++-- 103705/schema/response.schema.json | 2 +- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/103705/examples/example1/csp_records.schema.json b/103705/examples/example1/csp_records.schema.json index 55d933b..344b4e3 100644 --- a/103705/examples/example1/csp_records.schema.json +++ b/103705/examples/example1/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:103705:record-schema-id:v1", + "$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)", diff --git a/103705/examples/example2/csp_records.schema.json b/103705/examples/example2/csp_records.schema.json index 54a87ed..e5082c7 100644 --- a/103705/examples/example2/csp_records.schema.json +++ b/103705/examples/example2/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:103705:record-schema-id:v1", + "$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)", diff --git a/103705/examples/example3/csp_records.schema.json b/103705/examples/example3/csp_records.schema.json index e233a83..fca8fa5 100644 --- a/103705/examples/example3/csp_records.schema.json +++ b/103705/examples/example3/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:103705:record-schema-id:v1", + "$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)", diff --git a/103705/examples/example4/csp_records.schema.json b/103705/examples/example4/csp_records.schema.json index 13e2f97..a178670 100644 --- a/103705/examples/example4/csp_records.schema.json +++ b/103705/examples/example4/csp_records.schema.json @@ -1,5 +1,5 @@ { - "$id": "urn:etsi:li:103705:record-schema-id:v1", + "$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)", diff --git a/103705/examples/example5/csp_records.schema.json b/103705/examples/example5/csp_records.schema.json index c905dc0..0e8ffaf 100644 --- a/103705/examples/example5/csp_records.schema.json +++ b/103705/examples/example5/csp_records.schema.json @@ -1,9 +1,10 @@ { - "$id": "urn:etsi:li:103705:record-schema-id:v1", + "$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": { diff --git a/103705/schema/etsi_types.schema.json b/103705/schema/etsi_types.schema.json index 181b385..1854183 100644 --- a/103705/schema/etsi_types.schema.json +++ b/103705/schema/etsi_types.schema.json @@ -227,8 +227,8 @@ "identity": { "$ref": "#/$defs/DataAccessPartyId" }, - "aPNdNN": { - "description" : "APN or DPN associated with the data access", + "aPNDNN": { + "description" : "APN or DNN associated with the data access", "$ref": "ts_103280_2017_07#/$defs/DNN" }, "initialAccessTechnology": { diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json index 2529b2a..08d7766 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -91,7 +91,7 @@ } }, "record": { - "allOf" : [{ "$ref" : "urn:etsi:li:103705:record-schema-id:v1#/$defs/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)", -- GitLab From ce74166c9e7c110bcb4021e74562eb0ffd5fc739 Mon Sep 17 00:00:00 2001 From: canterburym Date: Mon, 5 Aug 2024 08:10:21 +0000 Subject: [PATCH 41/41] Removing extra colon in "type" --- 103705/schema/response.schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/103705/schema/response.schema.json b/103705/schema/response.schema.json index 08d7766..2d6f8a0 100644 --- a/103705/schema/response.schema.json +++ b/103705/schema/response.schema.json @@ -3,7 +3,7 @@ "$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", + "type": "object", "properties": { "recordSetDescription": { "$ref": "#/$defs/recordSetDescription" @@ -126,4 +126,4 @@ ] } } -} \ No newline at end of file +} -- GitLab