{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1656","repository_url":"https://api.github.com/repos/swagger-api/swagger-core","labels_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1656/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1656/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1656/events","html_url":"https://github.com/swagger-api/swagger-core/pull/1656","id":132572380,"number":1656,"title":"Allow to use of multiple Swagger configurations per single ServletConfig using base path as descriminator","user":{"login":"reta","id":509855,"avatar_url":"https://avatars.githubusercontent.com/u/509855?v=3","gravatar_id":"","url":"https://api.github.com/users/reta","html_url":"https://github.com/reta","followers_url":"https://api.github.com/users/reta/followers","following_url":"https://api.github.com/users/reta/following{/other_user}","gists_url":"https://api.github.com/users/reta/gists{/gist_id}","starred_url":"https://api.github.com/users/reta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reta/subscriptions","organizations_url":"https://api.github.com/users/reta/orgs","repos_url":"https://api.github.com/users/reta/repos","events_url":"https://api.github.com/users/reta/events{/privacy}","received_events_url":"https://api.github.com/users/reta/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2016-02-10T00:00:42Z","updated_at":"2016-08-01T18:56:58Z","closed_at":"2016-05-18T10:35:18Z","pull_request":{"url":"https://api.github.com/repos/swagger-api/swagger-core/pulls/1656","html_url":"https://github.com/swagger-api/swagger-core/pull/1656","diff_url":"https://github.com/swagger-api/swagger-core/pull/1656.diff","patch_url":"https://github.com/swagger-api/swagger-core/pull/1656.patch"},"body":"Hey guys,\r\n\r\nPlease take a look on this enhancement which allows to use multiple Swagger configurations per single servlet (more precisely, ServletConfig). Essentially, this is more generic approach than the one taken by https://github.com/swagger-api/swagger-core/issues/1482 and is using the base path as a unique context discriminator. The original discussion has been started here https://groups.google.com/forum/#!topic/swagger-swaggersocket/bf7uVBWYRTw and the solution suggested by @frantuma has been implemented.\r\n\r\nThere are two configuration parameters available:\r\n- Servlet init parameter '**swagger.use.path.based.config**' = true | false\r\n- **usePathBasedConfig** property of BeanConfig\r\n\r\nWhen those properties are set, the **SwaggerContextService** is going to use base path to uniquely identify the API Swagger's configuration components: context, config and scanner. This is very important in multiple use cases, for example when many independent APIs are deployed using single servlet (the best exampe could be OSGi container). \r\n\r\nThis approach works quite well for deploying multiple Swagger configs in the same JVM and even within same servlet. As the further suggestion, we could simplify **SwaggerContextService** a lot by removing SCANNER_ID_KEY, CONTEXT_ID_KEY and CONFIG_ID_KEY and rely solely on path-based configuration (less boilerplate to the users with the same goals being achieved).\r\n\r\nWhat do you think guys?\r\nThanks a lot.\r\n\r\nPS: The original issue was posted to Apache CXF JIRA is https://issues.apache.org/jira/browse/CXF-6740\r\n\r\nBest Regards,\r\n    Andriy Redko & Aki Yoshida "},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-core/issues/comments/236673312","html_url":"https://github.com/swagger-api/swagger-core/pull/1656#issuecomment-236673312","issue_url":"https://api.github.com/repos/swagger-api/swagger-core/issues/1656","id":236673312,"user":{"login":"swag-cxf","id":20666815,"avatar_url":"https://avatars.githubusercontent.com/u/20666815?v=3","gravatar_id":"","url":"https://api.github.com/users/swag-cxf","html_url":"https://github.com/swag-cxf","followers_url":"https://api.github.com/users/swag-cxf/followers","following_url":"https://api.github.com/users/swag-cxf/following{/other_user}","gists_url":"https://api.github.com/users/swag-cxf/gists{/gist_id}","starred_url":"https://api.github.com/users/swag-cxf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swag-cxf/subscriptions","organizations_url":"https://api.github.com/users/swag-cxf/orgs","repos_url":"https://api.github.com/users/swag-cxf/repos","events_url":"https://api.github.com/users/swag-cxf/events{/privacy}","received_events_url":"https://api.github.com/users/swag-cxf/received_events","type":"User","site_admin":false},"created_at":"2016-08-01T18:56:58Z","updated_at":"2016-08-01T18:56:58Z","body":"Not sure as i am not able to update xml elements in comments. Sorry for multiple comments.\r\nNeed to understand what extra value are expected in BeanConfig.\r\n\r\nshould usePathBasedConfig be passed as true? what else?"}}
{"actor":{"display_login":"swag-cxf"}}