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

Default `HttpContentCodec` implicit resolution is broken #3023

Closed 987Nabil closed 1 month ago

987Nabil commented 1 month ago

Calling this

 val  endpoint =
    (Endpoint(RoutePattern.GET / "resources") ?? Doc.p("Creates a resources"))
      .out[String](MediaType.application.json)

Results in a content type of */*, when called with accept */*. A quick check revealed, that the default implicit HttpContentCodec.fromSchema was not used.

We need a test that makes sure, that this implicit is used by default and eliminate the implicit with higher prio.

jdegoes commented 1 month ago

/bounty $75

algora-pbc[bot] commented 1 month ago

💎 $75 bounty • ZIO

Steps to solve:

  1. Start working: Comment /attempt #3023 with your implementation plan
  2. Submit work: Create a pull request including /claim #3023 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
🟡 @asr2003 Aug 31, 2024, 11:22:36 AM WIP
🟢 @987Nabil #3109
asr2003 commented 1 month ago

/attempt #3023

Algora profile Completed bounties Tech Active attempts Options
@asr2003    2 ZIO bounties
+ 2 bounties from 2 projects
JavaScript, Go,
HTML & more
Cancel attempt
algora-pbc[bot] commented 1 month ago

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

algora-pbc[bot] commented 1 month ago

@asr2003: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏

algora-pbc[bot] commented 1 month ago

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