camaraproject / Commonalities

Repository to describe, develop, document and test the common guidelines and assets for CAMARA APIs
Apache License 2.0
9 stars 24 forks source link

Add `minItems: 1` & `maxItems: 1` for subscription `types` #236

Closed maxl2287 closed 1 week ago

maxl2287 commented 3 weeks ago

What type of PR is this?

Add one of the following kinds:

What this PR does / why we need it:

Limits the minimum & maximum of requested types - list to one item.

Which issue(s) this PR fixes:

Fixes #235

jlurien commented 3 weeks ago

Hi @maxl2287, To ensure that we only have one item in the array, shouldn't we also set maxItems=1

That is a discussion we are having for the Geofencing API, and there consensus is that it makes sense to add the maximum as well, for APIs aligned with this version of Commonalities. In future releases, if several events per subscription are allowed, we can remove the limit.

maxl2287 commented 2 weeks ago

@jlurien @PedroDiez @patrice-conil:

I have now also set the maxItems: 1, so that we enforce one subscription-type within a request at least for this upcoming meta-release v0.4.0.

PedroDiez commented 2 weeks ago

@jlurien @PedroDiez @patrice-conil:

I have now also set the maxItems: 1, so that we enforce one subscription-type within a request at least for this upcoming meta-release v0.4.0.

To me is fine if we have consensus on it @patrice-conil, @shilpa-padgaonkar, @rartych (giving LGTM in advance)