Avoid overriding a custom host value in Swagger2Feature
@@ -420,7 +420,9 @@ public class Swagger2Feature extends AbstractSwaggerFeature {
// get the path part
URI u = URI.create(address);
setBasePath(u.getPath());
+ if (getHost() == null) {
setHost(u.getPort() < 0 ? u.getHost() : u.getHost() + ":" + u.getPort());
+ }
} else {
setBasePath(address);
}
