Loading 103120/examples/json/request5-JSON-Delivery.json +1 −1 Original line number Original line Diff line number Diff line Loading @@ -50,7 +50,7 @@ } } }, }, "delivery:Delivery": { "delivery:Delivery": { "delivery:EmbeddedJSONData": { "delivery:JSONData": { "field1" : "this is native JSON embedded data", "field1" : "this is native JSON embedded data", "field2" : 1234 "field2" : 1234 } } Loading 103120/schema/json/ts_103120_Delivery.schema.json +24 −1 Original line number Original line Diff line number Diff line Loading @@ -145,6 +145,17 @@ "required": [ "required": [ "delivery:XMLSchema" "delivery:XMLSchema" ] ] }, { "type": "object", "properties": { "delivery:JSONSchema": { "$ref": "#/$defs/EmbeddedJSONData" } }, "required": [ "delivery:JSONSchema" ] } } ] ] }, }, Loading Loading @@ -180,6 +191,17 @@ "required": [ "required": [ "delivery:XMLData" "delivery:XMLData" ] ] }, { "type": "object", "properties": { "delivery:JSONData": { "$ref": "#/$defs/EmbeddedJSONData" } }, "required": [ "delivery:JSONData" ] } } ] ] }, }, Loading @@ -204,6 +226,7 @@ "delivery:Data" "delivery:Data" ] ] }, }, "EmbeddedXMLData": {} "EmbeddedXMLData": {}, "EmbeddedJSONData": {} } } } } No newline at end of file 103120/schema/xsd/ts_103120_Delivery.xsd +7 −0 Original line number Original line Diff line number Diff line Loading @@ -39,6 +39,7 @@ <xs:choice> <xs:choice> <xs:element name="BinaryData" type="EmbeddedBinaryData"/> <xs:element name="BinaryData" type="EmbeddedBinaryData"/> <xs:element name="XMLSchema" type="SchemaContent"/> <xs:element name="XMLSchema" type="SchemaContent"/> <xs:element name="JSONSchema" type="EmbeddedJSONData"/> </xs:choice> </xs:choice> </xs:complexType> </xs:complexType> <xs:complexType name="SchemaContent"> <xs:complexType name="SchemaContent"> Loading @@ -50,6 +51,7 @@ <xs:choice> <xs:choice> <xs:element name="BinaryData" type="EmbeddedBinaryData"/> <xs:element name="BinaryData" type="EmbeddedBinaryData"/> <xs:element name="XMLData" type="EmbeddedXMLData"/> <xs:element name="XMLData" type="EmbeddedXMLData"/> <xs:element name="JSONData" type="EmbeddedJSONData"/> </xs:choice> </xs:choice> </xs:complexType> </xs:complexType> <xs:complexType name="EmbeddedBinaryData"> <xs:complexType name="EmbeddedBinaryData"> Loading @@ -65,4 +67,9 @@ <xs:any namespace="##other" minOccurs="1" maxOccurs="unbounded"/> <xs:any namespace="##other" minOccurs="1" maxOccurs="unbounded"/> </xs:sequence> </xs:sequence> </xs:complexType> </xs:complexType> <xs:complexType name="EmbeddedJSONData"> <xs:sequence> <xs:any namespace="##other" minOccurs="1" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:schema> </xs:schema> utils/translate_spec.py +6 −3 Original line number Original line Diff line number Diff line Loading @@ -70,10 +70,13 @@ if __name__ == "__main__": json_schemas = {} json_schemas = {} for schema_tuple in schema_locations: for schema_tuple in schema_locations: logging.info(f" Translating {schema_tuple}") logging.info(f" Translating {schema_tuple}") if 'xmldsig' in (schema_tuple[1]): if ns_map[schema_tuple[0]].get('skip'): # TODO - work out what to do here logging.info(f" Skipping {schema_tuple[0]} due to config...") logging.info(" Skipping XML Dsig...") continue continue # if 'xmldsig' in (schema_tuple[1]): # # TODO - work out what to do here # logging.info(" Skipping XML Dsig...") # continue js = translate_schema(schema_tuple[1], ns_map, schema_locations) js = translate_schema(schema_tuple[1], ns_map, schema_locations) # TODO - Special case, get rid of signature # TODO - Special case, get rid of signature Loading Loading
103120/examples/json/request5-JSON-Delivery.json +1 −1 Original line number Original line Diff line number Diff line Loading @@ -50,7 +50,7 @@ } } }, }, "delivery:Delivery": { "delivery:Delivery": { "delivery:EmbeddedJSONData": { "delivery:JSONData": { "field1" : "this is native JSON embedded data", "field1" : "this is native JSON embedded data", "field2" : 1234 "field2" : 1234 } } Loading
103120/schema/json/ts_103120_Delivery.schema.json +24 −1 Original line number Original line Diff line number Diff line Loading @@ -145,6 +145,17 @@ "required": [ "required": [ "delivery:XMLSchema" "delivery:XMLSchema" ] ] }, { "type": "object", "properties": { "delivery:JSONSchema": { "$ref": "#/$defs/EmbeddedJSONData" } }, "required": [ "delivery:JSONSchema" ] } } ] ] }, }, Loading Loading @@ -180,6 +191,17 @@ "required": [ "required": [ "delivery:XMLData" "delivery:XMLData" ] ] }, { "type": "object", "properties": { "delivery:JSONData": { "$ref": "#/$defs/EmbeddedJSONData" } }, "required": [ "delivery:JSONData" ] } } ] ] }, }, Loading @@ -204,6 +226,7 @@ "delivery:Data" "delivery:Data" ] ] }, }, "EmbeddedXMLData": {} "EmbeddedXMLData": {}, "EmbeddedJSONData": {} } } } } No newline at end of file
103120/schema/xsd/ts_103120_Delivery.xsd +7 −0 Original line number Original line Diff line number Diff line Loading @@ -39,6 +39,7 @@ <xs:choice> <xs:choice> <xs:element name="BinaryData" type="EmbeddedBinaryData"/> <xs:element name="BinaryData" type="EmbeddedBinaryData"/> <xs:element name="XMLSchema" type="SchemaContent"/> <xs:element name="XMLSchema" type="SchemaContent"/> <xs:element name="JSONSchema" type="EmbeddedJSONData"/> </xs:choice> </xs:choice> </xs:complexType> </xs:complexType> <xs:complexType name="SchemaContent"> <xs:complexType name="SchemaContent"> Loading @@ -50,6 +51,7 @@ <xs:choice> <xs:choice> <xs:element name="BinaryData" type="EmbeddedBinaryData"/> <xs:element name="BinaryData" type="EmbeddedBinaryData"/> <xs:element name="XMLData" type="EmbeddedXMLData"/> <xs:element name="XMLData" type="EmbeddedXMLData"/> <xs:element name="JSONData" type="EmbeddedJSONData"/> </xs:choice> </xs:choice> </xs:complexType> </xs:complexType> <xs:complexType name="EmbeddedBinaryData"> <xs:complexType name="EmbeddedBinaryData"> Loading @@ -65,4 +67,9 @@ <xs:any namespace="##other" minOccurs="1" maxOccurs="unbounded"/> <xs:any namespace="##other" minOccurs="1" maxOccurs="unbounded"/> </xs:sequence> </xs:sequence> </xs:complexType> </xs:complexType> <xs:complexType name="EmbeddedJSONData"> <xs:sequence> <xs:any namespace="##other" minOccurs="1" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:schema> </xs:schema>
utils/translate_spec.py +6 −3 Original line number Original line Diff line number Diff line Loading @@ -70,10 +70,13 @@ if __name__ == "__main__": json_schemas = {} json_schemas = {} for schema_tuple in schema_locations: for schema_tuple in schema_locations: logging.info(f" Translating {schema_tuple}") logging.info(f" Translating {schema_tuple}") if 'xmldsig' in (schema_tuple[1]): if ns_map[schema_tuple[0]].get('skip'): # TODO - work out what to do here logging.info(f" Skipping {schema_tuple[0]} due to config...") logging.info(" Skipping XML Dsig...") continue continue # if 'xmldsig' in (schema_tuple[1]): # # TODO - work out what to do here # logging.info(" Skipping XML Dsig...") # continue js = translate_schema(schema_tuple[1], ns_map, schema_locations) js = translate_schema(schema_tuple[1], ns_map, schema_locations) # TODO - Special case, get rid of signature # TODO - Special case, get rid of signature Loading