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: Nullable nested fields comply with 3.0 spec #953

Merged

Conversation

ShepleySound
Copy link

Fixes #952

"nullable": True is only valid in the presence
of a "type" field in OpenAPI 3.0. To create
a that works with conformant data validators,
we can use "anyOf" instead of "allOf".
Copy link
Member

@lafrech lafrech left a comment

Choose a reason for hiding this comment

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

After reading the blog post you linked to and going through your comments again, I think you're right.

@lafrech lafrech merged commit e555f45 into marshmallow-code:dev Nov 4, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect handling of marshmallow nested schema with allow_none=True in OpenAPI 3.0
3 participants