zio / zio-http

A next-generation Scala framework for building scalable, correct, and efficient HTTP clients and servers
https://zio.dev/zio-http
Apache License 2.0
787 stars 396 forks source link

Multi field case classes as input for query codec #2992

Closed 987Nabil closed 1 month ago

987Nabil commented 2 months ago

In https://github.com/zio/zio-http/pull/2991 I modified the TextBinaryCodec, so it works for Records with exactly one field. This is used in query codec, but only works if the user gives the query param name. To improve this, we should add that one can define a case class and the query codec looks for query params that fit all field names.

The goal is to be able to define HttpCodec.query[Params] where case class Params(perPage: Int, page: Int) to read two query params named perPage and page, for example.

jdegoes commented 2 months ago

/bounty $150

algora-pbc[bot] commented 2 months ago

💎 $150 bounty • ZIO

Steps to solve:

  1. Start working: Comment /attempt #2992 with your implementation plan
  2. Submit work: Create a pull request including /claim #2992 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
🟢 @987Nabil #3000
algora-pbc[bot] commented 1 month ago

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