fix: change Optional to NotRequired in OpenAPI pydantic plugin#4347
fix: change Optional to NotRequired in OpenAPI pydantic plugin#4347provinzkraut merged 2 commits intolitestar-org:mainfrom
Conversation
051356e to
7e6a43d
Compare
|
@provinzkraut, can i remove this test as not actual? litestar/tests/unit/test_plugins/test_pydantic/test_schema_plugin.py Lines 135 to 150 in 2a8f19e |
This is a regression test for the linked issue. Since we're still supporting Pydantic v1, that test should not break so no, it cannot be removed |
46a9365 to
0e3f33f
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4347 +/- ##
=======================================
Coverage 97.93% 97.93%
=======================================
Files 319 319
Lines 15585 15586 +1
Branches 1726 1726
=======================================
+ Hits 15263 15264 +1
Misses 184 184
Partials 138 138 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@raidzin Can you add a changelog entry? |
Done |
375a85e to
f54445a
Compare
|
Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/4347 |
fix: openAPI Schema generator incorrect type for fields with default_factory (cherry picked from commit ce3ff9e)
Description
Change wrapper from
OptionaltoNotRequiredfor pydantic fields with default_factoryNow fields appear as
stringand not required instead of(string | null)Closes
Fixes #4294