-
-
Notifications
You must be signed in to change notification settings - Fork 373
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
refactor: removes deprecated OpenAPIController #3297
Conversation
becaa65
to
bd8eee6
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v3.0 #3297 +/- ##
==========================================
- Coverage 98.26% 98.24% -0.02%
==========================================
Files 322 321 -1
Lines 14733 14570 -163
Branches 2343 2317 -26
==========================================
- Hits 14477 14314 -163
Misses 117 117
Partials 139 139 ☔ View full report in Codecov by Sentry. |
89ea5cc
to
c2c15cc
Compare
+====================================================+========================================================================+ | ||
| **OpenAPI** | | ||
+----------------------------------------------------+------------------------------------------------------------------------+ | ||
| ``litestar.openapi.OpenAPIController`` | :mod:`.openapi.plugins` | |
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.
Not sure if this is really an appropriate import redirection, but I mainly just wanted to keep the structure of the table in place so its there to fill out for other things.
whats-new-2 | ||
3.x Changelog <https://litestar.dev/3-dev/release-notes/changelog.html> |
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.
Will we be starting a new changelog document for the 3.x series, or just continue on with the existing changelog and add the 3.x stuff at the top? At the moment, this points to the 2.x changelog document?
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.
New one for 3.0 preferably
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.
And does the 2.x changelog still exist in the 3.0 branch, or do I just delete everything from the existing one and change the document title?
"What's new in 2.0": "release-notes/whats-new-2", | ||
"3.x Changelog": "https://docs.litestar.dev/3-dev/release-notes/changelog.html", |
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.
Same here, will this be a totally new doc?
+====================================================+========================================================================+ | ||
| **OpenAPI** | | ||
+----------------------------------------------------+------------------------------------------------------------------------+ | ||
| ``litestar.openapi.OpenAPIController`` | :mod:`.openapi.plugins` | |
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.
not sure if this is a good idea or not but what if we add, in v3 branch only, an intersphinx link to Litestar v2 docs so was can directly link things like litestar.openapi.OpenAPIController
? Idk if it would even work.. just a thought
* feat: Support `schema_extra` in `Parameter` and `Body` (#3022) This adds sort of a backdoor for modifying the generated OpenAPI spec. The value is given as `dict[str, Any]` where the key must match with the keyword parameter name in `Schema`. The values are used to override items in the generated `Schema` object, so they must be in correct types (ie. not in dictionary/json format). The values are added at main level, without recursive merging (because we're adjusting `Schema` object and not a dictionary). Recursive merge would be much more work. Chose not to implement the same for `ResponseSpec` because response models are generated as schema components, while `ResponseSpec` can be locally different. Handling the logic of creating new components when `schema_extra` is passed in `ResponseSpec` would be extra effort, and isn't probably as important as being able to adjust the inbound parameters, which are actually validated (and for which the documentation is even more important, than for the response). * Update litestar/params.py Co-authored-by: Jacob Coffee <[email protected]> * Update litestar/params.py Co-authored-by: Jacob Coffee <[email protected]> * Update litestar/params.py Co-authored-by: Jacob Coffee <[email protected]> --------- Co-authored-by: Jacob Coffee <[email protected]>
This PR removes all deprecated elements of OpenAPIConfig and the OpenAPIController, removes any obsolete tests and refactors tests that were parametrized to test both OpenAPIController and the router-based approach.
This adds a what's new section for the v3 docs and seeds it with migration details for the OpenAPI plugins.
c2c15cc
to
d093a47
Compare
Quality Gate passedIssues Measures |
Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/3297 |
Description
This PR removes all deprecated elements of OpenAPIConfig and the OpenAPIController, removes any obsolete tests and refactors tests that were parametrized to test both OpenAPIController and the router-based approach.
Supersedes #3271
Closes