Swagger 2 document doesn't contain Info/BasePath on Karaf
@@ -62,11 +62,14 @@ public class Swagger2Customizer {
if (dynamicBasePath) {
MessageContext ctx = createMessageContext();
String currentBasePath = StringUtils.substringBeforeLast(ctx.getHttpServletRequest().getRequestURI(), "/");
- if (!currentBasePath.equals(beanConfig.getBasePath())) {
data.setBasePath(currentBasePath);
+ if (data.getHost() == null) {
data.setHost(beanConfig.getHost());
+ }
+ if (data.getInfo() == null) {
data.setInfo(beanConfig.getInfo());
}
+
if (beanConfig.getSwagger() != null
&& beanConfig.getSwagger().getSecurityDefinitions() != null
&& data.getSecurityDefinitions() == null) {
