-
Notifications
You must be signed in to change notification settings - Fork 423
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
Automatic examples for OpenAPIGen #3196
Comments
/bounty $250 for basic implementation that works off |
💎 $250 bounty • ZIOSteps to solve:
Thank you for contributing to zio/zio-http! Add a bounty • Share on socials
|
/attempt #3196 Options |
@SAIKIRANSURAPALLI: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏 |
The bounty is up for grabs! Everyone is welcome to |
💡 @987Nabil submitted a pull request that claims the bounty. You can visit your bounty board to reward. |
🎉🎈 @987Nabil has been awarded $250! 🎈🎊 |
Is your feature request related to a problem? Please describe.
When using zio-schema to define an input message for a POST endpoint, I don't want to have to define
example(s) for the OpenAPI swagger manually.
Describe the solution you'd like
I would like the
OpenAPIGen
to have an option to generate examples based on the default value of a zio-schema.Describe alternatives you've considered
As an alternative I have added the default values of my zio-schema's as examples to the
Endpoint
definition.Additional context
I am working with proto specs, which get translated through scalapb to zio-schema's.
Consider this example:
It would be really nice of I could generate 2 example requests on the swagger endpoint automatically, one for each entry in the enum.
The workaround defined above is using something like this
The text was updated successfully, but these errors were encountered: