Skip to content

Commit a39f6f4

Browse files
committed
fix swagger-yaml responseObject mixin
1 parent 2a27c7d commit a39f6f4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SwaggerYamlGenerator.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
99
import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator;
1010
import io.swagger.codegen.*;
11+
import io.swagger.jackson.mixin.OperationResponseMixin;
1112
import io.swagger.jackson.mixin.ResponseSchemaMixin;
1213
import io.swagger.models.Model;
14+
import io.swagger.models.Operation;
1315
import io.swagger.models.Response;
1416
import io.swagger.models.Swagger;
1517
import io.swagger.util.DeserializationModule;
@@ -120,6 +122,7 @@ private void configureMapper(ObjectMapper mapper) {
120122
mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
121123
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
122124
mapper.addMixIn(Response.class, ResponseSchemaMixin.class);
125+
mapper.addMixIn(Operation.class, OperationResponseMixin.class);
123126
ReferenceSerializationConfigurer.serializeAsComputedRef(mapper);
124127
}
125128
}

0 commit comments

Comments
 (0)