Skip to content

Set correct target for the json schema models#1

Open
adamgammell wants to merge 1 commit intodevidw:masterfrom
8bytes:master
Open

Set correct target for the json schema models#1
adamgammell wants to merge 1 commit intodevidw:masterfrom
8bytes:master

Conversation

@adamgammell
Copy link
Copy Markdown

  • 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