Hey Ron,

I think the issue is that fact that the basePath is not being set on the 
swagger.json file @ runtime. If i set the basePath in the web.xml file then 
it works. The thing is i cant have the base path set in the web.xml I'm 
currently setting it in my boostrap class but thats not appending the 
basePath. I tried using my own version of DefaultJaxrsConfig where i would 
override the swagger.api.basepath setting, but it did not work. 

On Wednesday, March 8, 2017 at 9:41:15 PM UTC+2, Ron wrote:
>
> Thanks, that helps.
>
> So if you look at those headers, you’ll see the `Accept` is set correctly 
> to `application/json`.
>
> There might be an issue with the curl command generation, but the UI 
> itself executes the call correctly.
>
>  
>
>  
>
>  
>
> *From: *<[email protected] <javascript:>> on behalf of "
> [email protected] <javascript:>" <[email protected] <javascript:>>
> *Reply-To: *"[email protected] <javascript:>" <
> [email protected] <javascript:>>
> *Date: *Wednesday, 8 March 2017 at 11:19
> *To: *Swagger <[email protected] <javascript:>>
> *Subject: *Re: Swagger-ui does not use the right produces consumes 
> application/json
>
>  
>
> Hi Ron, 
>
>  
>
> Request Headers:
>
> *Accept:*
>
> application/json
>
> *Accept-Encoding:*
>
> gzip, deflate, sdch, br
>
> *Accept-Language:*
>
> en-US,en;q=0.8
>
> *Authorization: XXX*
>
> *Connection:*
>
> keep-alive
>
> *Host:*
>
> localhost:8008
>
>  
>
> *Response Headers:*
>
> *Content-Length:*
>
> 1182
>
> *Content-Type:*
>
> text/html;charset=ISO-8859-1
>
> *Date:*
>
> Wed, 08 Mar 2017 19:04:46 GMT
>
> *Server:*
>
> Apache-Coyote/1.1
>
>  
>
> *Request URL:*
>
> http://localhost:8008/promocodes/getActivePromoCodes/pathParam
>
> *Request Method:*
>
> GET
>
> *Status Code:*
>
> 404 Not Found
>
>  
>
> *Remote Address:*
>
> [::1]:8008
>
>  
>
> On Wednesday, March 8, 2017 at 8:50:23 PM UTC+2, Ron wrote: 
>
> Thanks. I’m going to nag you just a bit more. Did you clone the repository 
> and just use the /dist directory or did you download something specific?
>
>  
>
> You also say that the curl command is outputted that way. Can you check 
> the web console of your browser to see what’s actually being sent?
>
>  
>
>  
>
>  
>
> *From: *<[email protected]> on behalf of "
> [email protected]" <[email protected]>
> *Reply-To: *"[email protected]" <
> [email protected]>
> *Date: *Wednesday, 8 March 2017 at 10:12
> *To: *Swagger <[email protected]>
> *Subject: *Re: Swagger-ui does not use the right produces consumes 
> application/json
>
>  
>
> Hi Ron, 
>
>  
>
> Sorry about that, I am using version v2.2.10
>
> On Wednesday, March 8, 2017 at 8:08:34 PM UTC+2, Ron wrote: 
>
> You gotta help me out more. There are several versions listed there.
>
>  
>
> *From: *<[email protected]> on behalf of "
> [email protected]" <[email protected]>
> *Reply-To: *"[email protected]" <
> [email protected]>
> *Date: *Wednesday, 8 March 2017 at 10:03
> *To: *Swagger <[email protected]>
> *Subject: *Re: Swagger-ui does not use the right produces consumes 
> application/json
>
>  
>
> Hi Ron, 
>
>  
>
> The version listed here: 
>
>  
>
> https://github.com/swagger-api/swagger-ui
>
> On Wednesday, March 8, 2017 at 7:59:15 PM UTC+2, Ron wrote: 
>
> When you say latest version of swagger-ui, are you talking about the 
> latest released version or master?
>
>  
>
>  
>
>  
>
> *From: *<[email protected]> on behalf of "
> [email protected]" <[email protected]>
> *Reply-To: *"[email protected]" <
> [email protected]>
> *Date: *Wednesday, 8 March 2017 at 9:51
> *To: *Swagger <[email protected]>
> *Subject: *Re: Swagger-ui does not use the right produces consumes 
> application/json
>
>  
>
> Also I found on Swagger UI when executing an API call on my resource it 
> leaves out a part of the path for some reason. Maybe that is what causing 
> the above error?  
>
>  
>
> Request URL generated by swagger UI: 
> http://localhost:8008/test/getValues/pathParam
>
> What the Request URL supposed to look like: 
> http://localhost:8008/org/rest/swagger/test/getValues/pathParam
>
>  
>
> From what i understand this is the suppose to be the basePath 
> :org/rest/swagger right?
>
> On Wednesday, March 8, 2017 at 6:26:10 PM UTC+2, Ron wrote: 
>
> We’d need to know the version of swagger-ui you’re using and a spec that 
> reproduces the problem.
>
>  
>
>  
>
> *From: *<[email protected]> on behalf of "
> [email protected]" <[email protected]>
> *Reply-To: *"[email protected]" <
> [email protected]>
> *Date: *Wednesday, 8 March 2017 at 5:34
> *To: *Swagger <[email protected]>
> *Subject: *Swagger-ui does not use the right produces consumes 
> application/json
>
>  
>
> Hi there, 
>
>  
>
> My Swagger UI used to do the API calls correctly, but for some reason now 
> its returning server can't produce text/html. the curl command produced by 
> swagger is: curl -X GET --header 'Accept: text/html' --header 
> 'Authorization: Basic XXXXXXX' '
> http://localhost:8008/test/getValues/pathParam'
>
>  
>
> Thanks in advance!
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to