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

fix(pydantic v1): field not optional if default value #3476

Merged
merged 1 commit into from
May 7, 2024

Conversation

peterschutt
Copy link
Contributor

Fix issue where a pydantic v1 field annotation is wrapped with Optional if it is marked not required, but has a default value.

Closes #3471

Description

Closes

Fix issue where a pydantic v1 field annotation is wrapped with `Optional` if it is marked not required, but has a default value.

Closes #3471
@peterschutt peterschutt force-pushed the 3471-pydantic-v1-field-default branch from 31e8bb9 to ea193e5 Compare May 7, 2024 01:50
Copy link

sonarcloud bot commented May 7, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

github-actions bot commented May 7, 2024

Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/3476

@peterschutt peterschutt merged commit 39b048a into main May 7, 2024
28 checks passed
@peterschutt peterschutt deleted the 3471-pydantic-v1-field-default branch May 7, 2024 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: OpenAPI docs fail to generate with certain validators and pydantic v1
3 participants