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

Replace { "type": "string", "nullable": true } with { "type": ["string", "null"] } #366

Closed
nhtruong opened this issue Jun 27, 2024 · 0 comments · Fixed by #436
Closed

Replace { "type": "string", "nullable": true } with { "type": ["string", "null"] } #366

nhtruong opened this issue Jun 27, 2024 · 0 comments · Fixed by #436
Labels
bug Something isn't working

Comments

@nhtruong
Copy link
Collaborator

nhtruong commented Jun 27, 2024

We have many schemas describing a datatype that is either string or null with { "type": "string", "nullable": true }. However the correct way to describe this datatype is { "type": ["string", "null"] }. Moreover, Using anyOf on { "type": ["string", "null"] } and { "type": "string" } is redundant because the former already encapsulates the latter.

Spawning off of this comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant