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

When the swagger url has query parameters the api listings urls don't work for v1.2 service descriptions #1245

Closed
dilipkrish opened this issue May 6, 2015 · 1 comment
Milestone

Comments

@dilipkrish
Copy link

Not a very high priority I suppose, and I can attempt to fix this with a patch.

In springfox we have this notion of groups. So when we load a url in the swagger-ui if we had something like this http://localhost:8080/api-docs?group=default which returns the following resource listing.

GET http://localhost:8080/api-docs?group=default

{
   "apiVersion":"1.0",
   "apis":[
      {
         "description":"bundle",
         "path":"/default/bundle",
         "position":0
      }
   ],
   "authorizations":{

   },
   "info":{
      "contact":"blah blah",
      "description":"ACME Company API's",
      "license":"Apache License 2.0",
      "licenseUrl":"",
      "termsOfServiceUrl":"",
      "title":"ACME API's"
   },
   "swaggerVersion":"1.2"
}

When swagger ui tries to load the api listings, the urls it uses appends the api path to the base url. So the api listing requests end up with urls like this

http://localhost:8080/api-docs?group=default/default/bundle. it should actually be http://localhost:8080/api-docs/default/bundle

dilipkrish added a commit to springfox/springfox that referenced this issue May 7, 2015
using the ?group=<group-name> query parameter. This is to prevent the bug in swagger-ui/ swagger.js
where the api listing is resolved by appending the api url to the url on the swagger page.

more details available @ swagger-api/swagger-ui#1245

related to #727
@webron webron added this to the future milestone May 9, 2015
@webron webron modified the milestones: v2.1.2, future Jul 21, 2015
@webron webron modified the milestones: v2.1.2, v2.1.3 Jul 31, 2015
@webron webron modified the milestones: v2.1.3, v2.1.4 Sep 2, 2015
@webron
Copy link
Contributor

webron commented Jun 9, 2017

We're focused on the new UI now, which no longer supports Swagger 1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants