gs1 / EPCIS

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

Proposing json schema for capturing a single event from /eventTypes/{eventType}/events #91

Closed shalikasingh closed 3 years ago

shalikasingh commented 3 years ago

Hi @joelvogt , @mgh128 ,

We are constraining POST /eventTypes/{eventType}/events endpoint to capture a single event therefore having a schema same as POST /capture endpoint is not desired. We may possibly need to come up with a new capture schema definition specifically for this endpoint.

Proposal is to fix two things a) Fix the example to just accept single event and b) Have a dedicated schema that validate single event. We have created and attached the schema below for the same purpose. Please take a look at it. EPCIS-JSON-Schema-single-event.zip

joelvogt commented 3 years ago

@shalikasingh thank you again for providing the schema. I mentioned you in the commit to give you credit for it. I updated the POST /eventTypes/../events payload but had to replicate part of the schema because openapi doesn't support all the features of json schema. But I mentioned in the description that the json schema/ld schemas must be used.