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
Model Accept-Patch header #3450
Conversation
@@ -120,6 +120,17 @@ object Header { | |||
} | |||
} | |||
|
|||
/** Helper trait that provides a default way of rendering the value provided a Renderer */ | |||
trait RecurringRenderer extends Recurring { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is equivalent to RecurringRenderable
but for `Renderer
/** Helper trait that provides a default way of rendering the value provided a Renderer */ | ||
trait RecurringRenderer extends Recurring { | ||
type Value | ||
implicit val renderer: Renderer[Value] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any ideas on how to initialize this by default? My attempts ended poorly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eager abstract values make me nervous. How about a def?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
@@ -46,7 +46,7 @@ class HeadersSpec extends Http4sSpec { | |||
Header("Accept-Patch", ""), | |||
Header("Access-Control-Allow-Credentials", "") | |||
) | |||
headers.get(`Accept-Patch`).map(_.value) must beSome("") | |||
headers.get(`Access-Control-Allow-Credentials`).map(_.value) must beSome("") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about the meaning of this test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was just making sure that we could get headers when we had a key but not a full model. I don't think it's a great test, and what you did is fine.
Signed-off-by: Carlos Quiroz <carlos.m.quiroz@gmail.com>
Signed-off-by: Carlos Quiroz <carlos.m.quiroz@gmail.com>
Rebased and fixed comment |
As part of modeling headers, here's
Accept-Patch