-
Notifications
You must be signed in to change notification settings - Fork 243
Description
I think the specs should be more clear about how the exact response should be when it comes to returning a single object vs multiple. In fact, each of these cases should have their own little section:
/policies/policies/{id}/geographies/geographies/{id}
When "bundling" the docs on single/multiple endpoints, confusion and conflicts arise. An example: id is listed as a query parameter along with start_date and end_date. Though this is not really a query parameter, but part of the endpoint.
I studied the code in mds-core and found some undocumented responses when it comes to single objects
res.status(200).send({ version: res.locals.version, data: { policies: active } })=> Would produce expected result according to docs
res.status(200).send({ version: res.locals.version, data: { policy } })=> Would produce something not expected or documentet, the data object would contain a policy property
return res.status(200).send({ version: res.locals.version, data: { geographies } })=> Would produce expected result according to docs
return res.status(200).send({ version: res.locals.version, data: { geography } })=> Would produce something not expected or documentet, the data object would contain a geography property
Thank you