Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

maxl2287
Copy link
Contributor

@maxl2287 maxl2287 commented Jun 13, 2024

What type of PR is this?

Add one of the following kinds:

  • correction

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

PedroDiez
PedroDiez previously approved these changes Jun 14, 2024
Copy link
Collaborator

@PedroDiez PedroDiez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@patrice-conil patrice-conil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@jlurien
Copy link
Contributor

jlurien commented Jun 14, 2024

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 maxl2287 changed the title Add minItems: 1 for subscription types Add minItems: 1 & maxItems: 1 for subscription types Jun 17, 2024
@maxl2287
Copy link
Contributor Author

@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
Copy link
Collaborator

@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)

Copy link
Collaborator

@PedroDiez PedroDiez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@shilpa-padgaonkar shilpa-padgaonkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/LGTM

Copy link
Collaborator

@patrice-conil patrice-conil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/LGTM

Copy link
Collaborator

@bigludo7 bigludo7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rartych rartych merged commit 3e1f133 into camaraproject:main Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Subscriptions-template]: Setting a minItems: 1 & maxItems: 1 for types in subscription-requests
7 participants