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

Aligned notifications with guideline #155

Merged

Conversation

akoshunyadi
Copy link
Collaborator

What type of PR is this?

Add one of the following kinds:

  • correction

What this PR does / why we need it:

Update of the notification event related fields based on the API design guideline

Which issue(s) this PR fixes:

Fixes #154

Special notes for reviewers:

Changelog input

Update of the notification event related fields based on the API design guideline

Additional documentation

Update of the notification event related fields based on the API design guideline
@hdamker
Copy link
Collaborator

hdamker commented May 30, 2023

Have added some suggestions for reviews, especially @eric-murray @bigludo7 and @sfnuser who were involved within the definition of the chapter in the guideline document.

bigludo7
bigludo7 previously approved these changes May 31, 2023
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.

Very good aligned with subscription & notification guideline.

Copy link
Collaborator

@sfnuser sfnuser left a comment

Choose a reason for hiding this comment

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

@akoshunyadi Thanks. Looks good.

One comment - As we have added notificationAuthToken, should we remove apiKey security scheme? However, I wonder what could be the appropriate securitySchemes we could specify for notification - perhaps {} & bearerAuth?

Copy link
Collaborator

@jlurien jlurien left a comment

Choose a reason for hiding this comment

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

  • Event has to be remodeled with discriminator at the right level
  • We have to adapt callback to the new strcture:
paths:
  /sessions:
    post:
...
      callbacks:
        notifications:
          "{$request.body#/weebhook/notificationUrl}":
            ...

I also think we are not specifying the callback correctly since the beginning. The POST /notification operation must not be at first level of /paths, but within the POST /sessions callbacks, as indicated in https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v3.0/callback-example.yaml

code/API_definitions/qod-api.yaml Outdated Show resolved Hide resolved
@akoshunyadi
Copy link
Collaborator Author

  • We have to adapt callback to the new strcture:
paths:
  /sessions:
    post:
...
      callbacks:
        notifications:
          "{$request.body#/weebhook/notificationUrl}":
            ...

I also think we are not specifying the callback correctly since the beginning. The POST /notification operation must not be at first level of /paths, but within the POST /sessions callbacks, as indicated in https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v3.0/callback-example.yaml

@jlurien I think your both points are valid. Putting /notification below the POST /sessions decreases the chance for misinterpretation of the /notification endpoint

@emil-cheung
Copy link
Collaborator

@akoshunyadi Thanks. Looks good.

One comment - As we have added notificationAuthToken, should we remove apiKey security scheme? However, I wonder what could be the appropriate securitySchemes we could specify for notification - perhaps {} & bearerAuth?

Probably keep API Key but carried by header instead of query string.
I have created an issue about it #157

@akoshunyadi
Copy link
Collaborator Author

@patrice-conil any preference from Orange?

@hdamker
Copy link
Collaborator

hdamker commented Jun 2, 2023

any preference from Orange?

@bigludo7 @patrice-conil the question at hand is if it is also from your perspective ok to omit apiKey completely from the spec (as we discussed in today's call). The notion is that this would be in line with the new design guidelines for notifications.

@emil-cheung
Copy link
Collaborator

@akoshunyadi Thanks. Looks good.
One comment - As we have added notificationAuthToken, should we remove apiKey security scheme? However, I wonder what could be the appropriate securitySchemes we could specify for notification - perhaps {} & bearerAuth?

Probably keep API Key but carried by header instead of query string. I have created an issue about it #157

According to the community discussion, please remove API key.

@patrice-conil
Copy link
Collaborator

@hdamker, we are ok to remove apiKey, notificationAuthToken will be fine.

@eric-murray
Copy link
Collaborator

apiKey definition in components remains, but is now unused. This should also be deleted.

Copy link
Collaborator

@sfnuser sfnuser left a comment

Choose a reason for hiding this comment

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

Thanks @akoshunyadi. Updated comments

code/API_definitions/qod-api.yaml Show resolved Hide resolved
code/API_definitions/qod-api.yaml Show resolved Hide resolved
@hdamker
Copy link
Collaborator

hdamker commented Jun 7, 2023

@akoshunyadi with the merge of #138 we have now some merge conflicts. May I ask you to rebase?

@eric-murray eric-murray mentioned this pull request Jun 9, 2023
Co-authored-by: Jose Luis Urien <jlurien@gmail.com>
@hdamker
Copy link
Collaborator

hdamker commented Jun 14, 2023

@bigludo7 @eric-murray @jlurien @sfnuser From my point of view we are done. Can you please see if your comments are done and confirm with an approval?

Copy link
Collaborator

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

@hdamker hdamker left a comment

Choose a reason for hiding this comment

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

/LGTM - thanks @akoshunyadi for the rebase.

@hdamker hdamker merged commit 83f1ca4 into camaraproject:main Jun 16, 2023
@hdamker hdamker mentioned this pull request Jun 17, 2023
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.

Align handling of notification callback with updated design guidelines
8 participants