-
Notifications
You must be signed in to change notification settings - Fork 9k
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
Getting 406 : undefined on JBoss 7 with RESTeasy #405
Comments
Have you set your |
Yes, I have that set on my resource. I get this error from swagger-ui so it's not my resource but rather the swagger resource this error relates to. |
That seems really wrong. What version of swagger-ui are you running? Can you re-test with the latest master? Also, what version of swagger-jaxrs are you using? |
I'm using 1.3.2 of swagger-jaxrs and grabbed the swagger-ui dist folder yesterday from here. |
Actually I think this is probably the wrong place for this issue. Either it is some issue in swagger-core or in RESTeasy. |
Yes, this does belong in swagger-core. And what do you get from issuing this statement: curl -X GET -H "accept:application/json" http://localhost:8080/restapi/api-docs curl -X GET -H "accept:application/json;charset=utf-8" http://localhost:8080/restapi/api-docs By chance, did you forget to add the swagger providers? https://github.com/wordnik/swagger-core/blob/master/samples/java-jaxrs/src/main/webapp/WEB-INF/web.xml#L12 |
I get the same 406 for both statements. However it works with this:
Regarding the providers, my web.xml looks pretty much like this one. |
if still an issue, let's take this to swagger -core. |
I, too, have bumped into this today -- was this ever taken to swagger - core; if so, can someone please provide a link or any follow on information. Thank you. |
@hasselstromk - As @fehguy mentioned, if you encounter this issue, please open a new on in swagger-core and give out as many details as you can. We'll take it from there. |
I created a follow up issue in swagger-core. |
@Isnogud77 - were you able to solve the 406 issue? |
This message is issued by JBoss when I try to use swagger-ui:
From the browser it workes fine. So I analyzed the request with chrome dev tools. It seems when the accept header is set to
application/json
, RESTeasy fails with the above message. It seems to only work if accept is set to*/*
.Using this extra line I was able to workaround this issue but it seems to me like an hack. But maybe it's helpful for someone else.
The text was updated successfully, but these errors were encountered: