From 709472ab14bfaef16bed30d72613cb7b6e592dd1 Mon Sep 17 00:00:00 2001 From: joshua bauer Date: Mon, 22 Oct 2018 11:17:27 -0700 Subject: [PATCH] Use OAS objectMappers. --- .../proteus/services/OpenAPIService.java | 26 ++++++------------- .../proteus/services/SwaggerService.java | 6 ----- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/src/main/java/io/sinistral/proteus/services/OpenAPIService.java b/src/main/java/io/sinistral/proteus/services/OpenAPIService.java index a344046..a526dc6 100644 --- a/src/main/java/io/sinistral/proteus/services/OpenAPIService.java +++ b/src/main/java/io/sinistral/proteus/services/OpenAPIService.java @@ -41,6 +41,8 @@ import io.sinistral.proteus.server.tools.oas.Reader; import io.sinistral.proteus.server.tools.oas.ServerModelResolver; import io.sinistral.proteus.server.tools.oas.ServerParameterExtension; +import io.swagger.util.Yaml; +import io.swagger.v3.core.util.Json; import io.swagger.v3.jaxrs2.ext.OpenAPIExtensions; import io.swagger.v3.jaxrs2.integration.JaxrsApplicationAndAnnotationScanner; import io.swagger.v3.oas.integration.GenericOpenApiContext; @@ -111,11 +113,11 @@ public class OpenAPIService extends BaseService implements Supplier registeredHandlerWrappers; - protected ObjectMapper mapper = new ObjectMapper(); + protected ObjectMapper mapper = null; protected ObjectWriter writer = null; - protected YAMLMapper yamlMapper = new YAMLMapper(); + protected ObjectMapper yamlMapper = null; protected Path resourcePath = null; @@ -127,28 +129,16 @@ public class OpenAPIService extends BaseService implements Supplier this.reader.read(c)); this.swagger = this.reader.getSwagger(); - - - - - - }