Closed domguinard closed 2 years ago
Few more review comments:
/events
at the end for all the endpoints returning events e.g. have /eventTypes/{eventType}/events
instead of /eventTypes/{eventType}
@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
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
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
Apart from the comments left here there are 27 additional key comments that group would need to discuss
@dakbhavesh very good point on the GET /queries/{queryName}/subscriptions/{subscriptionID}
it was an omission on my side, I corrected it now.
Significant PR implementing:
/events
resource.../events
subresoucesall
virtual event typePOST
eventTypes
toevents