zio-http icon indicating copy to clipboard operation
zio-http copied to clipboard

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

Open 987Nabil opened this issue 11 months ago â€ĸ 1 comments

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 avatar Mar 11 '24 13:03 987Nabil

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

fernanluyano avatar Mar 15 '24 17:03 fernanluyano

@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.

987Nabil avatar Mar 18 '24 20:03 987Nabil

/bounty $150

jdegoes avatar Jun 05 '24 02:06 jdegoes

💎 $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 bounty â€ĸ Share on socials

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

algora-pbc[bot] avatar Jun 05 '24 02:06 algora-pbc[bot]

/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 avatar Jun 16 '24 10:06 mobley-trent

is this issue still open @987Nabil ?

mobley-trent avatar Jun 16 '24 11:06 mobley-trent

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

algora-pbc[bot] avatar Jun 16 '24 11:06 algora-pbc[bot]

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

987Nabil avatar Jun 16 '24 11:06 987Nabil

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

algora-pbc[bot] avatar Jun 18 '24 12:06 algora-pbc[bot]