{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1620","repository_url":"https://api.github.com/repos/swagger-api/swagger-core","labels_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1620/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1620/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1620/events","html_url":"https://github.com/swagger-api/swagger-core/issues/1620","id":128025393,"number":1620,"title":"ApiListingResource has a class level @Path(\"/\") which can collide with other JAX-RS resources","user":{"login":"Helmsdown","id":1689115,"avatar_url":"https://avatars.githubusercontent.com/u/1689115?v=3","gravatar_id":"","url":"https://api.github.com/users/Helmsdown","html_url":"https://github.com/Helmsdown","followers_url":"https://api.github.com/users/Helmsdown/followers","following_url":"https://api.github.com/users/Helmsdown/following{/other_user}","gists_url":"https://api.github.com/users/Helmsdown/gists{/gist_id}","starred_url":"https://api.github.com/users/Helmsdown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Helmsdown/subscriptions","organizations_url":"https://api.github.com/users/Helmsdown/orgs","repos_url":"https://api.github.com/users/Helmsdown/repos","events_url":"https://api.github.com/users/Helmsdown/events{/privacy}","received_events_url":"https://api.github.com/users/Helmsdown/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-21T21:38:53Z","updated_at":"2016-02-04T04:25:45Z","closed_at":null,"body":"The current ApiListingResource has a class level @Path(\"/\") annotation. This is causing us a minor annoyance in that we have dependencies which also do the same thing and collide. We are currently getting around this by sub-classing ApiListingResource and redefining the the path to @Path(\"/swagger\") (so we access the swagger json via /swagger/swagger.json).\r\n\r\nLooking at the endpoints offered by ApiListingResource I see why this was done. You wanted to support the following URLs for grabbing the swagger config:\r\n\r\n/swagger (with an Accepts of application/yaml) -> returns yaml\r\n/swagger (with an Accepts of application/json) -> returns json\r\n/swagger.json (returns json)\r\n/swagger.yaml (returns yaml)\r\n\r\nWith that being said a @Path(\"/\") is a bit \"greedy\" and sets the ApiListingResource to collide with other \"greedy\" resources.\r\n\r\nI see two possible solutions:\r\n1. Support only /swagger.json & /swagger.yaml in ApiListingResource. This would allow you have a class level  @Path(\"/swagger.{type:json|yaml}\").\r\n2. Move the /swagger endpoints to a different class with a class level @Path(\"/swagger\"). If a swagger user depends on calling /swagger then they would need to make sure that this new resource is registered with the container (if they are registering the \"io.swagger.listing\" package then this would be done for them already). \r\n\r\nWDYT? I am willing and able to submit a pull request to help resolve this.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-core/issues/comments/179623749","html_url":"https://github.com/swagger-api/swagger-core/issues/1620#issuecomment-179623749","issue_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1620","id":179623749,"user":{"login":"mikerott","id":857712,"avatar_url":"https://avatars.githubusercontent.com/u/857712?v=3","gravatar_id":"","url":"https://api.github.com/users/mikerott","html_url":"https://github.com/mikerott","followers_url":"https://api.github.com/users/mikerott/followers","following_url":"https://api.github.com/users/mikerott/following{/other_user}","gists_url":"https://api.github.com/users/mikerott/gists{/gist_id}","starred_url":"https://api.github.com/users/mikerott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikerott/subscriptions","organizations_url":"https://api.github.com/users/mikerott/orgs","repos_url":"https://api.github.com/users/mikerott/repos","events_url":"https://api.github.com/users/mikerott/events{/privacy}","received_events_url":"https://api.github.com/users/mikerott/received_events","type":"User","site_admin":false},"created_at":"2016-02-04T04:25:45Z","updated_at":"2016-02-04T04:25:45Z","body":"Related to issue #1647 "}}