-
Notifications
You must be signed in to change notification settings - Fork 436
feat(event_handler): add support for externalDocs attribute in OpenAPI schema #6945
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
feat(event_handler): add support for externalDocs attribute in OpenAPI schema #6945
Conversation
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
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.
Hey @mhindery thanks for sending this PR! Can you please fix the error in CI? Just need to remove the extra import.
tests/functional/event_handler/_pydantic/test_openapi_external_documentation.py
Outdated
Show resolved
Hide resolved
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.
We need to fix this as well.
Co-authored-by: Leandro Damascena <[email protected]> Signed-off-by: Mathieu Hinderyckx <[email protected]>
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #6945 +/- ##
========================================
Coverage 96.20% 96.20%
========================================
Files 273 273
Lines 12709 12713 +4
Branches 949 950 +1
========================================
+ Hits 12227 12231 +4
Misses 377 377
Partials 105 105 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Thanks for this PR @mhindery! Approved.
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.
Thank you for the contribution and congrats for your first PR merged in this project 🎉 !
Whenever you can, please leave a comment under the original issue so we can assign it to you and track it properly (GitHub doesn't allow us to assign it without you interacting with it first).
Thanks
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |
Issue number: #6948
Summary
OpenAPI generation: add support for passing the top-level
externalDocs
property in the schema generation.See the field in the spec on https://swagger.io/docs/specification/v3_0/api-general-info/
Changes
A data model for ExternalDocumentation was already present in this repo. It was however not possible to pass it through in the
configure_openapi()
method, so it could not be specified by users. This PR adds an argument to this method (and similarly to theenable_swagger()
) where such an object can be passed.User experience
After this PR, users can pass in a link to external documentation to be put in the generated OpenAPI spec.
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
No, the new argument is an optional one.
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.