GERONIMO-6667 ensure jackson is optional
authorRomain Manni-Bucau <rmannibucau@gmail.com>
Fri, 21 Dec 2018 14:31:17 +0000 (15:31 +0100)
committerRomain Manni-Bucau <rmannibucau@gmail.com>
Fri, 21 Dec 2018 14:31:17 +0000 (15:31 +0100)
geronimo-openapi-impl/src/main/java/org/apache/geronimo/microprofile/openapi/impl/loader/yaml/Yaml.java
geronimo-openapi-impl/src/main/java/org/apache/geronimo/microprofile/openapi/jaxrs/JacksonOpenAPIYamlBodyWriter.java

index 5ba558b..d4c3b5c 100644 (file)
@@ -28,74 +28,12 @@ import javax.json.bind.annotation.JsonbProperty;
 import javax.json.bind.annotation.JsonbTransient;
 
 import org.apache.geronimo.microprofile.openapi.impl.loader.ApiBindings;
-import org.apache.geronimo.microprofile.openapi.impl.model.APIResponseImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.APIResponsesImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.CallbackImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.ComponentsImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.ContactImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.ContentImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.DiscriminatorImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.EncodingImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.ExampleImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.ExtensibleImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.ExternalDocumentationImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.HeaderImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.InfoImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.LicenseImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.LinkImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.MediaTypeImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.OAuthFlowImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.OAuthFlowsImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.OpenAPIImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.OperationImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.ParameterImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.PathItemImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.PathsImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.ReferenceImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.RequestBodyImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.SchemaImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.ScopesImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.SecurityRequirementImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.SecuritySchemeImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.ServerImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.ServerVariableImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.ServerVariablesImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.TagImpl;
-import org.apache.geronimo.microprofile.openapi.impl.model.XMLImpl;
-import org.eclipse.microprofile.openapi.models.Components;
-import org.eclipse.microprofile.openapi.models.Extensible;
-import org.eclipse.microprofile.openapi.models.ExternalDocumentation;
 import org.eclipse.microprofile.openapi.models.OpenAPI;
-import org.eclipse.microprofile.openapi.models.Operation;
-import org.eclipse.microprofile.openapi.models.PathItem;
-import org.eclipse.microprofile.openapi.models.Paths;
-import org.eclipse.microprofile.openapi.models.Reference;
-import org.eclipse.microprofile.openapi.models.callbacks.Callback;
-import org.eclipse.microprofile.openapi.models.examples.Example;
 import org.eclipse.microprofile.openapi.models.headers.Header;
-import org.eclipse.microprofile.openapi.models.info.Contact;
-import org.eclipse.microprofile.openapi.models.info.Info;
-import org.eclipse.microprofile.openapi.models.info.License;
-import org.eclipse.microprofile.openapi.models.links.Link;
-import org.eclipse.microprofile.openapi.models.media.Content;
-import org.eclipse.microprofile.openapi.models.media.Discriminator;
 import org.eclipse.microprofile.openapi.models.media.Encoding;
-import org.eclipse.microprofile.openapi.models.media.MediaType;
 import org.eclipse.microprofile.openapi.models.media.Schema;
-import org.eclipse.microprofile.openapi.models.media.XML;
 import org.eclipse.microprofile.openapi.models.parameters.Parameter;
-import org.eclipse.microprofile.openapi.models.parameters.RequestBody;
-import org.eclipse.microprofile.openapi.models.responses.APIResponse;
-import org.eclipse.microprofile.openapi.models.responses.APIResponses;
-import org.eclipse.microprofile.openapi.models.security.OAuthFlow;
-import org.eclipse.microprofile.openapi.models.security.OAuthFlows;
-import org.eclipse.microprofile.openapi.models.security.Scopes;
-import org.eclipse.microprofile.openapi.models.security.SecurityRequirement;
 import org.eclipse.microprofile.openapi.models.security.SecurityScheme;
-import org.eclipse.microprofile.openapi.models.servers.Server;
-import org.eclipse.microprofile.openapi.models.servers.ServerVariable;
-import org.eclipse.microprofile.openapi.models.servers.ServerVariables;
-import org.eclipse.microprofile.openapi.models.tags.Tag;
 
 import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.core.JsonGenerator;
index 6bf946f..17841b0 100644 (file)
@@ -25,6 +25,7 @@ import java.lang.reflect.Type;
 import java.util.concurrent.atomic.AtomicReference;
 
 import javax.enterprise.context.Dependent;
+import javax.enterprise.inject.Vetoed;
 import javax.ws.rs.ConstrainedTo;
 import javax.ws.rs.Produces;
 import javax.ws.rs.WebApplicationException;
@@ -49,6 +50,7 @@ public class JacksonOpenAPIYamlBodyWriter<T> extends BaseOpenAPIYamlBodyWriter<T
         Mapper.get().writeValue(entityStream, entity);
     }
 
+    @Vetoed
     private static class Mapper {
         private static final AtomicReference<com.fasterxml.jackson.databind.ObjectMapper> REF = new AtomicReference<>();