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

Include operation ID for the async mechanism #64

Merged
merged 6 commits into from
Jan 16, 2025

Conversation

jgarciahospital
Copy link
Collaborator

What type of PR is this?

  • enhancement/feature

What this PR does / why we need it:

Add async operationId for API consumers to track async responses.

Which issue(s) this PR fixes:

Fixes #61

Copy link

github-actions bot commented Dec 23, 2024

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ ACTION actionlint 2 0 0.03s
✅ OPENAPI spectral 1 0 1.83s
✅ REPOSITORY git_diff yes no 0.03s
✅ REPOSITORY secretlint yes no 0.8s
✅ YAML yamllint 1 0 0.46s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

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.

Thanks Jorge.
I think we should document a bit this operationId in the documentation / Notification URL and token part no?
We have just to indicate that in case of async pattern an operationId must be sent in the 204 response and then once the 'real' result in send back asynchronously via a notification this operationId must be part of the notification to allow API consumer to "connect the dots".
WDYT?

@jgarciahospital
Copy link
Collaborator Author

Thanks Jorge. I think we should document a bit this operationId in the documentation / Notification URL and token part no? We have just to indicate that in case of async pattern an operationId must be sent in the 204 response and then once the 'real' result in send back asynchronously via a notification this operationId must be part of the notification to allow API consumer to "connect the dots". WDYT?

Thanks ludo for the proposal, description included!

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 !

* **Notification URL and token**: Developers may provide a callback URL (`sink`) for receiving an async response.
This is an optional parameter. If `sink` is included, it is RECOMMENDED for the client to provide as well the `sinkCredential`
property to protect the notification endpoint. In the current version,`sinkCredential.credentialType` MUST be set to `ACCESSTOKEN` if provided.
When an asynchronous response is requested, the 202 response of the API will include with an `operationId` property, this `operationId` will
Copy link
Contributor

@jlurien jlurien Jan 7, 2025

Choose a reason for hiding this comment

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

Suggested change
When an asynchronous response is requested, the 202 response of the API will include with an `operationId` property, this `operationId` will
When an asynchronous response is requested, the 202 response of the API will include an `operationId` property. This `operationId` property will

Co-authored-by: Jose Luis Urien <jlurien@gmail.com>
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.

Thanks !

@jgarciahospital jgarciahospital changed the title Update population-density-data.yaml Include operation ID for the async mechanism Jan 15, 2025
sachinvodafone
sachinvodafone previously approved these changes Jan 15, 2025
@jgarciahospital
Copy link
Collaborator Author

@sachinvodafone @bigludo7 PR reviewed and errors fixed, can be validated and merged

@jgarciahospital jgarciahospital merged commit f80b6cc into main Jan 16, 2025
2 checks passed
@jgarciahospital jgarciahospital deleted the jgarciahospital-patch-5 branch January 16, 2025 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add notification ID in async mechanism
4 participants