-
Notifications
You must be signed in to change notification settings - Fork 412
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
Intoroduce query parameters with multiple values to Endpoint API #2631
Conversation
925532e
to
8d0effc
Compare
e9276d5
to
b096f41
Compare
There is a Scala 3 build failure that is failing the build (maybe among other things). |
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #2631 +/- ##
==========================================
+ Coverage 65.38% 65.46% +0.07%
==========================================
Files 144 144
Lines 8407 8420 +13
Branches 1532 1494 -38
==========================================
+ Hits 5497 5512 +15
+ Misses 2910 2908 -2 ☔ View full report in Codecov by Sentry. |
fd4a7c9
to
2dba05c
Compare
d0aa32a
to
f4a3e40
Compare
zio-http/shared/src/main/scala/zio/http/codec/QueryCodecs.scala
Outdated
Show resolved
Hide resolved
49af996
to
b546a7b
Compare
@jdegoes The way this is modeled rn makes it impossible to to analyse if it is single or multi value. This might make it hard to generate docs etc. from endpoints. What do you think about adding a field |
@987Nabil The way this is modeled rn makes it impossible to to analyse if it is single or multi value. How about Most code doesn't need to know about that, it's only really for doc or client generation. cc @ekhov |
@jdegoes Do I get it correctly that you want this hint to be added as a |
QueryCodec now retuns NonEmptyChunk[A] instead of just A Single value codecs that return A are derived from it
If query string specifies key fo expected query, but not the value, parse it as empty chunk. If no keys are present- throw error
9590049
to
446c5cd
Compare
446c5cd
to
8c376e2
Compare
Introduce query codec for multi value query parameters. Now
HttpCodec.Query[A]
returnsChunk[A]
as a result value. Add new query codecs to describe these multi value parameters toQueryCodecs
preserving old ones(query
etc), which are now a transformed versions of multi value codecs.Now single value codecs fail if endpoint receives multiple values for this query
/claim #2321