Skip to content
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

How to specify examples? #49

Open
JaneJeon opened this issue May 28, 2023 · 2 comments
Open

How to specify examples? #49

JaneJeon opened this issue May 28, 2023 · 2 comments

Comments

@JaneJeon
Copy link

For use with fastify-swagger, I'd like to be able to add examples at the property level and at the schema level.

From reading the code, it seems like this library just pipes the output from https://github.com/StefanTerdell/zod-to-json-schema, but that library only concerns itself with json schema, not OpenAPI, so it wouldn't even be in scope for that library to emit examples.

So how would I go about adding example property/schema here? if it's not possible, what needs to be changed/added?

Thanks

@maktouch
Copy link

It depends on this I guess

colinhacks/zod#2549

@matthiasbaldi
Copy link

As an update: colinhacks rejected the PR and is working on a RFC to solve the metadata issue.

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

No branches or pull requests

3 participants