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

Use @description zio-schema annotation at types for generating OpenAPI docs #2722

Closed
987Nabil opened this issue Mar 11, 2024 · 9 comments · Fixed by #2914
Closed

Use @description zio-schema annotation at types for generating OpenAPI docs #2722

987Nabil opened this issue Mar 11, 2024 · 9 comments · Fixed by #2914
Labels

Comments

@987Nabil
Copy link
Contributor

Currently we can handover docs explicitly in the in/out methods of the Endpoint API or use ?? on a content codec to add docs to the type while generating OpenAPI. We should also respect the @description annotation of zio-schema for the type, if it exists.

This is already working for fields, but not for top-level types.

@987Nabil 987Nabil added the enhancement New feature or request label Mar 11, 2024
@fernanluyano
Copy link

I think this is a bug instead of an enhancement. Assuming this issue of not populating a description like below. Since it's required by OAS 3.1
Screenshot 2024-03-15 at 1 04 47 PM

@987Nabil
Copy link
Contributor Author

@fernanluyano this is related, but not the same. The error you describe comes due to the fact that the field is optional and therefor left out when serialising the open API. Is should be non optional with a default value.

This is, that we want to have a different source for the docs. And this is not a bug.

@jdegoes
Copy link
Member

jdegoes commented Jun 5, 2024

/bounty $150

Copy link

algora-pbc bot commented Jun 5, 2024

💎 $150 bounty • ZIO

Steps to solve:

  1. Start working: Comment /attempt #2722 with your implementation plan
  2. Submit work: Create a pull request including /claim #2722 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to zio/zio-http!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🔴 @mobley-trent Jun 16, 2024, 10:48:35 AM WIP
🟢 @987Nabil #2914

@mobley-trent
Copy link

mobley-trent commented Jun 16, 2024

/attempt #2722

Algora profile Completed bounties Tech Active attempts Options
@mobley-trent 3 bounties from 2 projects
Python, Rust,
Jupyter Notebook
﹟2700
Cancel attempt

@mobley-trent
Copy link

is this issue still open @987Nabil ?

Copy link

algora-pbc bot commented Jun 16, 2024

💡 @987Nabil submitted a pull request that claims the bounty. You can visit your bounty board to reward.

@987Nabil
Copy link
Contributor Author

@mobley-trent Hey 👋 Sorry, I actually just opened a PR for this. Should have written here something first I guess 😅

Copy link

algora-pbc bot commented Jun 18, 2024

🎉🎈 @987Nabil has been awarded $150! 🎈🎊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants