Skip to content

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