Skip to content
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

Issues around body parameters #50

Closed
kryptt opened this issue Feb 5, 2015 · 5 comments
Closed

Issues around body parameters #50

kryptt opened this issue Feb 5, 2015 · 5 comments

Comments

@kryptt
Copy link

kryptt commented Feb 5, 2015

Specifying both

(POST / "login" decoding(EntityDecoder.text)) |>> {p: String) => Ok("success")}
(POST / "login" decoding(ArgonautJSONDecoder)) |>> {p: Login) => Ok("success")}

in the HttpService fail with the server reporting Invalid Content-Type header

Ehen running through the swagger-ui, in both cases, the browser sent:
Content-Type: "text/*; charset=UTF-8"

@aryairani
Copy link

@kryptt Tell me more about this ArgonautJSONDecoder

@kryptt
Copy link
Author

kryptt commented Feb 9, 2015

@refried Well, it is an object I had written previously that simply decodes a json body into the Login case class I had also written previously. The point was that both custom body decoders and an included text decoder threw exceptions.

This issue is still open because the commit f1807ac prevents the exception, but still does not generate the appropriate swagger metadata...

@aryairani
Copy link

Roger.

@bryce-anderson
Copy link
Member

@kryptt, it seems to me that the problem described in the issue is fixed. Could you close this and open a new issue specific to the invalid swagger docs?

@kryptt
Copy link
Author

kryptt commented Feb 10, 2015

fair enough

@kryptt kryptt closed this as completed Feb 10, 2015
bryce-anderson added a commit to http4s/http4s that referenced this issue Feb 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants