gs1 / EPCIS

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

Implement events top level resource #355

Closed domguinard closed 2 years ago

domguinard commented 2 years ago

Significant PR implementing:

dakbhavesh commented 2 years ago

Few more review comments:

  1. To update openapi.json once review comments are incorporated in openapi.yml
  2. As suggested by @mgh128, I also second the thought to keep /events at the end for all the endpoints returning events e.g. have /eventTypes/{eventType}/events instead of /eventTypes/{eventType}
dakbhavesh commented 2 years ago

@domguinard, How about adding support of dynamic EPCIS query parameter in openapi.yaml?

Here is how we can achieve this: https://stackoverflow.com/questions/49582559/how-to-document-dynamic-query-parameter-names-in-openapi-swagger

FYI: @jmcanterafonseca-iota, @mgh128

domguinard commented 2 years ago

In the last commit I ensured that all creation (POST) endpoints were consistent in terms of what they return (payload + status code):

POST /queries/{queryName}

the intended meaning of the payload can be summarized as a representation of the status of, or results obtained from, the action;

POST /capture

POST /events

POST /queries/{queryName}/subscriptions

dakbhavesh commented 2 years ago

Hi @domguinard, Based on previous calls, I assume that we decided to return subscription details instead of just subscription id for the endpoint GET /queries/{queryName}/subscriptions/{subscriptionID}.

Should we incorporate this change in the current PR itself? Possibly we may want to fix the summary and example. As per summary, it looks as if we are just going to return the subscription id.

an example may look like below:

{
    "subscriptionID": "7cec849f-72f7-4a9d-bc86-080d3c5b7c98",
    "queryName": "GetIlmdExtension",
    "callbackUrl": "http://example.com/testWebhookSubscription",
    "secret": "0435ojtojt02",
    "initialRecordTime": "2022-01-06T06:52:24.880Z",
    "reportIfEmpty": true,
    "schedule": {
        "second": "0/30"
    },
    "createdAt": "2022-01-06T06:52:24.889Z"
}

fyi: @jmcanterafonseca-iota

jmcanterafonseca-iota commented 2 years ago

Apart from the comments left here there are 27 additional key comments that group would need to discuss

domguinard commented 2 years ago

@dakbhavesh very good point on the GET /queries/{queryName}/subscriptions/{subscriptionID} it was an omission on my side, I corrected it now.