gs1 / EPCIS

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

Simple object type for EPCISQuery and EPCISMasterDataQuery in openapi.yml #71

Closed shalikasingh closed 3 years ago

shalikasingh commented 3 years ago

Unsure of intent behind converting type to array but EPCISQuery and EPCISMasterDataQuery schema definition can be kept as type simple object if it is sufficient.

Updated schema will look like below:

EPCISQuery:
   type: object
   description: An EPCIS event query.
   example:
     {
       "eventTypes": "ObjectEvent" ,

       "EQ_bizStep": [
           "urn:epcglobal:cbv:bizstep:shipping",
           "urn:epcglobal:cbv:bizstep:receiving" ]
     }
  externalDocs:
  url: query-schema.json

EPCISMasterDataQuery:
   type: object
  description: An EPCIS master data query.
  externalDocs:
     url: https://www.gs1.org/sites/default/files/docs/epc/EPCIS-Standard-1.2-r-2016-09-29.pdf
mgh128 commented 3 years ago

I think the logic is that the eventType parameter of EPCIS v1.2 (please see below line 2108 on page 71) permits a list of events to be specified. This is because an EPCIS query might ask for e.g. "give me AggregationEvents or AssociationEvents where the parentID = x". eventType permits a list to be specified and it is assumed that there is a logical OR (union) across all elements specified in that list.

So to support the same behaviour in rest, I think it is better for eventType to support an array or list, not just a single object.

joelvogt commented 3 years ago

I changed it to an object again. It will be introduced as part of the Webhook update