Removing redundant serializer
@@ -85,8 +85,6 @@ public class Swagger2Feature extends AbstractSwaggerFeature {
private String ignoreRoutes;
- private Swagger2Serializers swagger2Serializers;
-
private boolean supportSwaggerUi = true;
private String swaggerUiVersion;
@@ -131,7 +129,7 @@ public class Swagger2Feature extends AbstractSwaggerFeature {
List<Object> swaggerResources = new LinkedList<>();
- if (swagger2Serializers == null && customizer == null) {
+ if (customizer == null) {
customizer = new Swagger2Customizer();
}
ApiListingResource apiListingResource = new Swagger2ApiListingResource(customizer);
@@ -169,14 +167,8 @@ public class Swagger2Feature extends AbstractSwaggerFeature {
}
}
}
- if (swagger2Serializers != null) {
- swagger2Serializers.setClassResourceInfos(cris);
- swagger2Serializers.setDynamicBasePath(dynamicBasePath);
- providers.add(swagger2Serializers);
- } else {
customizer.setClassResourceInfos(cris);
customizer.setDynamicBasePath(dynamicBasePath);
- }
providers.add(new ReaderConfigFilter());
@@ -210,12 +202,8 @@ public class Swagger2Feature extends AbstractSwaggerFeature {
if (swagger != null && securityDefinitions != null) {
swagger.setSecurityDefinitions(securityDefinitions);
}
- if (customizer == null) {
- swagger2Serializers.setBeanConfig(beanConfig);
- } else {
customizer.setBeanConfig(beanConfig);
}
- }
public boolean isUsePathBasedConfig() {
return usePathBasedConfig;
@@ -273,10 +261,6 @@ public class Swagger2Feature extends AbstractSwaggerFeature {
this.ignoreRoutes = ignoreRoutes;
}
- public void setSwagger2Serializers(final Swagger2Serializers swagger2Serializers) {
- this.swagger2Serializers = swagger2Serializers;
- }
-
@Override
protected void setBasePathByAddress(String address) {
if (!address.startsWith("/")) {
