Skip to content

Set correct target for the json schema models #1

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adamgammell
Copy link

  • Set openApi3 target on zod json schema generator

This fixes an issue with nullable properties. Currently the generator is targeting jsonSchema7 by default which is adding null to the types. OpenAPI 3.0.3 instead uses the nullable property

https://swagger.io/docs/specification/v3_0/data-models/data-types/#null

https://github.com/apple/swift-openapi-generator/blob/main/Sources/swift-openapi-generator/Documentation.docc/Development/Handling-nullable-schemas.md#optionality-in-openapi-and-json-schema

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.

1 participant