Skip to content

Conversation

@turkerdev
Copy link
Owner

fixes #127

We can allow users to use raw openapi schema by skipping schema transformation if the schema is not instance of zod.

const responseSchema = response[prop]

const transformedResponse = convertZodToJsonSchema(schema)
if (responseSchema instanceof ZodSchema === false) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use typeguard instead to make it work across realms?

@kibertoad
Copy link
Collaborator

@turkerdev maybe this should be mentioned in the docs?

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.

How to add response headers with cookies in Swagger using fastify-type-provider-zod?

3 participants