-
Notifications
You must be signed in to change notification settings - Fork 31
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
Update the geofencing subscription models to align on CAMARA commonalities #202
Update the geofencing subscription models to align on CAMARA commonalities #202
Conversation
What are we doing about this here? Wdyt? types:
description: |
Camara Event types eligible to be delivered by this subscription.
Note: for the Commonalities meta-release v0.4 we enforce to have only event type per subscription then for following meta-release use of array MUST be decided
at API project level.
type: array
items:
$ref: "#/components/schemas/SubscriptionEventType" |
I think we can add this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGFM !
Thanks Max
I agree to setting the maximum to 1 in this version as that will impose implementations to follow the agreed current limit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should include in our spec for this version the values that are allowed: protocol=HTTP, credentialType=ACCESSTOKEN and remove the content for all other options which are not applicable.
FYI, @PedroDiez, as you have been more involved than me in this track in Commonalities |
Yes, I find maximum=1 reasonable. Thank you. |
@bigludo7, as you are also adopting the subscription model to other APIs, what is the agreement in Commonalities? Are we supposed to use the common artifact in Commonalities, as it is, even with the options which are not applicable to the current version, or APIs can make adjustments? I suggested to remove protocols and credentialTypes which are not supported but Pedro told me that the agreement was to include all options from the beginning and specify errors for options not applicable. |
Hi all, This is my understading about the agreement in commonalities: @bigludo7, @shilpa-padgaonkar, @rartych
cc @maxl2287 |
Hi all, I'm globally aligned with https://github.com/PedroDiez statement... but I should confess one contradiction (with myself ...ouch) because I was also fine to add this For the protocol & tokenType I prefer to keep this in this yaml as defined in the template. |
Indeed I read first the issue about adding the maximum even if it was not in the artifact, and I thought that the same criteria would apply to the rest of non-applicable stuff for this version :-) I think we should have a consistent approach for this, as other APIs may choose to not add the maximum, and that would create inconsistency. IMO, commonalities versions should reflect what is applicable to each version, and they will evolve as we support more options, but if the agreement is to model the operations as in the template, we should stick to whatever it is in the artifact for this version. |
@jlurien - about maximum of types:
description: |
Camara Event types eligible to be delivered by this subscription.
Note: for the Commonalities meta-release v0.4 we enforce to have only event type per subscription then for following meta-release use of array MUST be decided
at API project level.
type: array
items:
type: string Or in API design guidelines:
Based on this notes it seems to be limited to a maximum of one item in the array (as of now). So in my PoV we could set here a limit of 1. And when we want to support multiple Types, we can still create an own issue for it. Wdyt @jlurien @bigludo7 |
@PedroDiez @jlurien @bigludo7 Because otherwise it would also be possible to provide an empty array (what is I guess not the expectation, when creating subscriptions) I have created an issue for that: camaraproject/Commonalities#235 |
If that was the decision, I'm OK with keeping all unused values for protocol and credentialType. There are specific examples for errors INVALID_PROTOCOL and INVALID_CREDENTIAL for those. There is no specific code for the case when more that one event, or zero items, are sent, so it makes even more sense to add the limits minItems, maxItems in the schema, and rely on the generic 400 INVALID_ARGUMENT when a request body is not compliant. |
Agreed also with @maxl2287 proposal for the |
…e/update-camara-subscriptions-model
6a89f4f
to
d5b22fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM/
For simplicity probably good to manage device identifier update defined in PR213 in another issue/PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@maxl2287 We can merge this one, correct? |
@bigludo7 I am finished. So yes. :) |
What type of PR is this?
What this PR does / why we need it:
Update of the subscription-models based on:
Which issue(s) this PR fixes:
Fixed Issues