gs1 / EPCIS

Draft files being shared for EPCIS 2.0 development
Other
22 stars 7 forks source link

Resolve schema for master data examples #50

Closed mgh128 closed 3 years ago

mgh128 commented 3 years ago

@dakbhavesh reminded @mgh128 that we currently have two conflicting master data examples and need to resolve these and may need to update the schema for master data.

mgh128 commented 3 years ago

We will need a separate JSON Schema (and possibly also a separate SHACL file) for validating an EPCISMasterDataDocument.

Thanks for drawing attention to the issue - but the fundamental problem is that in the XML data binding, the EPCISBody appearing within an EPCISMasterData is structurally different from the EPCISBody appearing within an EPCISDocument.

Within an EPCISDocument, EPCISBody expects an event list.
Within an EPCISMasterDataDocument, EPCISBody expects a vocabulary list.

I'll prepare a separate JSON Schema for validating an EPCISMasterDataDocument - which should validate https://github.com/gs1/EPCIS/blob/master/JSON/Example_9.8.1-MasterData.jsonld

I'll also update the README file for the JSON repository to make this clearer.

mgh128 commented 3 years ago

Created https://github.com/gs1/EPCIS/blob/master/JSON/EPCISMasterData-JSON-Schema.json - appears to validate an EPCISMasterDataDocument (including https://github.com/gs1/EPCIS/blob/master/JSON/Example_9.8.1-MasterData.jsonld )

Need to think about validating queries for EPCIS master data.

CraigRe commented 3 years ago

Mark streamlining.