Skip to content

feat: allow passing a refStrategy option to zod-to-json-schema - #42

Open
jltwheeler wants to merge 1 commit into
elierotenberg:masterfrom
jltwheeler:feat-add-ref-strategy-option
Open

feat: allow passing a refStrategy option to zod-to-json-schema#42
jltwheeler wants to merge 1 commit into
elierotenberg:masterfrom
jltwheeler:feat-add-ref-strategy-option

Conversation

@jltwheeler

@jltwheeler jltwheeler commented May 21, 2023

Copy link
Copy Markdown

Currently, when using openapi-typescript-codegen to consume the generated openapi.json file from fastify-zod for my frontend, I encounter difficulties due to the incompatibility between the codegen types and the default refStrategy options options used in zod-to-json-schema.

To overcome this limitation and improve the integration between these two amazing tools (great work btw 😄), I propose the addition of a new refStrategy option in the buildJSONSchema options and pass this down to zod-to-json-schema.

Also, given this is just the addition of a passthrough prop, I didn't think writing a whole test for this was necessary 😅

Thanks!

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