Skip to content

Commit

Permalink
Third attempt to fix Swagger 2 parsing issues in native images
Browse files Browse the repository at this point in the history
  • Loading branch information
en-milie committed Jan 19, 2022
1 parent ea15d8c commit a1b5932
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@
<version>${wiremock-jre8.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator</artifactId>
Expand All @@ -325,6 +329,10 @@
<groupId>javax.mail</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-compat-spec-parser</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
10 changes: 8 additions & 2 deletions src/main/java/com/endava/cats/ReflectionConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
import com.jayway.jsonpath.spi.mapper.MappingProvider;
import com.jayway.jsonpath.spi.mapper.TapestryMappingProvider;
import io.quarkus.runtime.annotations.RegisterForReflection;
import io.swagger.parser.Swagger20Parser;
import io.swagger.parser.SwaggerParser;
import io.swagger.parser.SwaggerResolver;
import io.swagger.v3.oas.annotations.links.Link;
import io.swagger.v3.oas.annotations.links.LinkParameter;
import io.swagger.v3.oas.models.Components;
Expand Down Expand Up @@ -138,7 +141,7 @@
PasswordSchema.class, Schema.class, StringSchema.class, UUIDSchema.class, XML.class,
CookieParameter.class, HeaderParameter.class, Parameter.class, PathParameter.class, QueryParameter.class,
RequestBody.class, ApiResponse.class, ApiResponses.class, OAuthFlow.class, OAuthFlows.class, Scopes.class, SecurityRequirement.class,
SecurityScheme.class, Server.class, ServerVariable.class, ServerVariables.class, Tag.class, io.swagger.models.ParamType.class,
SecurityScheme.class, Server.class, ServerVariable.class, ServerVariables.class, Tag.class,
Configuration.class, Criteria.class, DocumentContext.class, EvaluationListener.class, Filter.class, InvalidCriteriaException.class, InvalidJsonException.class,
InvalidModificationException.class, InvalidPathException.class, JsonPath.class, JsonPathException.class, MapFunction.class, Option.class, ParseContext.class,
PathNotFoundException.class, Predicate.class, ReadContext.class, TypeRef.class, ValueCompareException.class,
Expand Down Expand Up @@ -169,7 +172,10 @@
CompositeStringExpression.class, TemplateAwareExpressionParser.class, LiteralExpression.class, TemplateParserContext.class, ConstructorExecutor.class, TypeComparator.class,
EvaluationContext.class, AccessException.class, PropertyAccessor.class, TypeConverter.class, BeanResolver.class, TypedValue.class, CatsDSLParser.class,
Base64.Encoder.class, Base64.Decoder.class, Base64.class, RandomUtils.class, RandomStringUtils.class, DateFormatUtils.class, DateUtils.class, DurationUtils.class, LocalDate.class, LocalDateTime.class,
OffsetDateTime.class, String.class, SwaggerConverter.class, SwaggerParserExtension.class
OffsetDateTime.class, String.class, SwaggerConverter.class, SwaggerParserExtension.class, SwaggerParser.class, Swagger20Parser.class, SwaggerResolver.class,
io.swagger.v3.core.converter.AnnotatedType.class, io.swagger.v3.core.converter.ModelConverter.class, io.swagger.v3.core.converter.ModelConverterContext.class, io.swagger.v3.core.converter.ModelConverterContextImpl.class, io.swagger.v3.core.converter.ModelConverters.class, io.swagger.v3.core.converter.ResolvedSchema.class, io.swagger.v3.core.filter.AbstractSpecFilter.class, io.swagger.v3.core.filter.OpenAPISpecFilter.class, io.swagger.v3.core.filter.SpecFilter.class, io.swagger.v3.core.jackson.AbstractModelConverter.class, io.swagger.v3.core.jackson.ApiResponsesSerializer.class, io.swagger.v3.core.jackson.CallbackSerializer.class, io.swagger.v3.core.jackson.ModelResolver.class, io.swagger.v3.core.jackson.PackageVersion.class, io.swagger.v3.core.jackson.PathsSerializer.class, io.swagger.v3.core.jackson.SchemaSerializer.class, io.swagger.v3.core.jackson.SwaggerAnnotationIntrospector.class, io.swagger.v3.core.jackson.SwaggerModule.class, io.swagger.v3.core.jackson.TypeNameResolver.class, io.swagger.v3.core.jackson.mixin.ComponentsMixin.class, io.swagger.v3.core.jackson.mixin.DateSchemaMixin.class, io.swagger.v3.core.jackson.mixin.ExtensionsMixin.class, io.swagger.v3.core.jackson.mixin.OpenAPIMixin.class, io.swagger.v3.core.jackson.mixin.OperationMixin.class, io.swagger.v3.core.model.ApiDescription.class, io.swagger.v3.core.util.AnnotationsUtils.class, io.swagger.v3.core.util.ApiResponsesDeserializer.class, io.swagger.v3.core.util.CallbackDeserializer.class, io.swagger.v3.core.util.Constants.class, io.swagger.v3.core.util.DeserializationModule.class, io.swagger.v3.core.util.EncodingPropertyStyleEnumDeserializer.class, io.swagger.v3.core.util.EncodingStyleEnumDeserializer.class, io.swagger.v3.core.util.HeaderStyleEnumDeserializer.class, io.swagger.v3.core.util.Json.class, io.swagger.v3.core.util.ModelDeserializer.class, io.swagger.v3.core.util.ObjectMapperFactory.class, io.swagger.v3.core.util.ParameterDeserializer.class, io.swagger.v3.core.util.ParameterProcessor.class, io.swagger.v3.core.util.PathUtils.class, io.swagger.v3.core.util.PathsDeserializer.class, io.swagger.v3.core.util.PrimitiveType.class, io.swagger.v3.core.util.RefUtils.class, io.swagger.v3.core.util.ReflectionUtils.class, io.swagger.v3.core.util.SecuritySchemeDeserializer.class, io.swagger.v3.core.util.Yaml.class, io.swagger.v3.oas.annotations.ExternalDocumentation.class, io.swagger.v3.oas.annotations.Hidden.class, io.swagger.v3.oas.annotations.OpenAPIDefinition.class, io.swagger.v3.oas.annotations.Operation.class, io.swagger.v3.oas.annotations.Parameter.class, io.swagger.v3.oas.annotations.Parameters.class, io.swagger.v3.oas.annotations.callbacks.Callback.class, io.swagger.v3.oas.annotations.callbacks.Callbacks.class, io.swagger.v3.oas.annotations.enums.Explode.class, io.swagger.v3.oas.annotations.enums.ParameterIn.class, io.swagger.v3.oas.annotations.enums.ParameterStyle.class, io.swagger.v3.oas.annotations.enums.SecuritySchemeIn.class, io.swagger.v3.oas.annotations.enums.SecuritySchemeType.class, io.swagger.v3.oas.annotations.extensions.Extension.class, io.swagger.v3.oas.annotations.extensions.ExtensionProperty.class, io.swagger.v3.oas.annotations.extensions.Extensions.class, io.swagger.v3.oas.annotations.headers.Header.class, io.swagger.v3.oas.annotations.info.Contact.class, io.swagger.v3.oas.annotations.info.Info.class, io.swagger.v3.oas.annotations.info.License.class, io.swagger.v3.oas.annotations.links.Link.class, io.swagger.v3.oas.annotations.links.LinkParameter.class, io.swagger.v3.oas.annotations.media.ArraySchema.class, io.swagger.v3.oas.annotations.media.Content.class, io.swagger.v3.oas.annotations.media.DiscriminatorMapping.class, io.swagger.v3.oas.annotations.media.Encoding.class, io.swagger.v3.oas.annotations.media.ExampleObject.class, io.swagger.v3.oas.annotations.media.Schema.class, io.swagger.v3.oas.annotations.parameters.RequestBody.class, io.swagger.v3.oas.annotations.responses.ApiResponse.class, io.swagger.v3.oas.annotations.responses.ApiResponses.class, io.swagger.v3.oas.annotations.security.OAuthFlow.class, io.swagger.v3.oas.annotations.security.OAuthFlows.class, io.swagger.v3.oas.annotations.security.OAuthScope.class, io.swagger.v3.oas.annotations.security.SecurityRequirement.class, io.swagger.v3.oas.annotations.security.SecurityRequirements.class, io.swagger.v3.oas.annotations.security.SecurityScheme.class, io.swagger.v3.oas.annotations.security.SecuritySchemes.class, io.swagger.v3.oas.annotations.servers.Server.class, io.swagger.v3.oas.annotations.servers.ServerVariable.class, io.swagger.v3.oas.annotations.servers.Servers.class, io.swagger.v3.oas.annotations.tags.Tag.class, io.swagger.v3.oas.annotations.tags.Tags.class, io.swagger.v3.oas.models.Components.class, io.swagger.v3.oas.models.ExternalDocumentation.class, io.swagger.v3.oas.models.OpenAPI.class, io.swagger.v3.oas.models.Operation.class, io.swagger.v3.oas.models.PathItem.class, io.swagger.v3.oas.models.Paths.class, io.swagger.v3.oas.models.callbacks.Callback.class, io.swagger.v3.oas.models.examples.Example.class, io.swagger.v3.oas.models.headers.Header.class, io.swagger.v3.oas.models.info.Contact.class, io.swagger.v3.oas.models.info.Info.class, io.swagger.v3.oas.models.info.License.class, io.swagger.v3.oas.models.links.Link.class, io.swagger.v3.oas.models.links.LinkParameter.class, io.swagger.v3.oas.models.media.ArraySchema.class, io.swagger.v3.oas.models.media.BinarySchema.class, io.swagger.v3.oas.models.media.BooleanSchema.class, io.swagger.v3.oas.models.media.ByteArraySchema.class, io.swagger.v3.oas.models.media.ComposedSchema.class, io.swagger.v3.oas.models.media.Content.class, io.swagger.v3.oas.models.media.DateSchema.class, io.swagger.v3.oas.models.media.DateTimeSchema.class, io.swagger.v3.oas.models.media.Discriminator.class, io.swagger.v3.oas.models.media.EmailSchema.class, io.swagger.v3.oas.models.media.Encoding.class, io.swagger.v3.oas.models.media.EncodingProperty.class, io.swagger.v3.oas.models.media.FileSchema.class, io.swagger.v3.oas.models.media.IntegerSchema.class, io.swagger.v3.oas.models.media.MapSchema.class, io.swagger.v3.oas.models.media.MediaType.class, io.swagger.v3.oas.models.media.NumberSchema.class, io.swagger.v3.oas.models.media.ObjectSchema.class, io.swagger.v3.oas.models.media.PasswordSchema.class, io.swagger.v3.oas.models.media.Schema.class, io.swagger.v3.oas.models.media.StringSchema.class, io.swagger.v3.oas.models.media.UUIDSchema.class, io.swagger.v3.oas.models.media.XML.class, io.swagger.v3.oas.models.parameters.CookieParameter.class, io.swagger.v3.oas.models.parameters.HeaderParameter.class, io.swagger.v3.oas.models.parameters.Parameter.class, io.swagger.v3.oas.models.parameters.PathParameter.class, io.swagger.v3.oas.models.parameters.QueryParameter.class, io.swagger.v3.oas.models.parameters.RequestBody.class, io.swagger.v3.oas.models.responses.ApiResponse.class, io.swagger.v3.oas.models.responses.ApiResponses.class, io.swagger.v3.oas.models.security.OAuthFlow.class, io.swagger.v3.oas.models.security.OAuthFlows.class, io.swagger.v3.oas.models.security.Scopes.class, io.swagger.v3.oas.models.security.SecurityRequirement.class, io.swagger.v3.oas.models.security.SecurityScheme.class, io.swagger.v3.oas.models.servers.Server.class, io.swagger.v3.oas.models.servers.ServerVariable.class, io.swagger.v3.oas.models.servers.ServerVariables.class, io.swagger.v3.oas.models.tags.Tag.class, io.swagger.parser.OpenAPIParser.class, io.swagger.v3.parser.converter.SwaggerInventory.class, io.swagger.v3.parser.converter.SwaggerConverter.class, io.swagger.config.ConfigFactory.class, io.swagger.config.FilterFactory.class, io.swagger.config.Scanner.class, io.swagger.config.ScannerFactory.class, io.swagger.config.SwaggerConfig.class, io.swagger.converter.ModelConverter.class, io.swagger.converter.ModelConverterContext.class, io.swagger.converter.ModelConverterContextImpl.class, io.swagger.converter.ModelConverters.class, io.swagger.core.filter.AbstractSpecFilter.class, io.swagger.core.filter.SpecFilter.class, io.swagger.core.filter.SwaggerSpecFilter.class, io.swagger.jackson.AbstractModelConverter.class, io.swagger.jackson.ModelResolver.class, io.swagger.jackson.PackageVersion.class, io.swagger.jackson.SwaggerAnnotationIntrospector.class, io.swagger.jackson.SwaggerModule.class, io.swagger.jackson.TypeNameResolver.class, io.swagger.jackson.mixin.IgnoreOriginalRefMixin.class, io.swagger.jackson.mixin.OriginalRefMixin.class, io.swagger.jackson.mixin.ResponseSchemaMixin.class, io.swagger.model.ApiDescription.class, io.swagger.model.ApiInfo.class, io.swagger.util.AllowableEnumValues.class, io.swagger.util.AllowableRangeValues.class, io.swagger.util.AllowableValues.class, io.swagger.util.AllowableValuesUtils.class, io.swagger.util.BaseReaderUtils.class, io.swagger.util.DeserializationModule.class, io.swagger.util.Json.class, io.swagger.util.ModelDeserializer.class, io.swagger.util.ObjectMapperFactory.class, io.swagger.util.ParameterDeserializer.class, io.swagger.util.ParameterProcessor.class, io.swagger.util.PathDeserializer.class, io.swagger.util.PathUtils.class, io.swagger.util.PrimitiveType.class, io.swagger.util.PropertyDeserializer.class, io.swagger.util.ReferenceSerializationConfigurer.class, io.swagger.util.ReflectionUtils.class, io.swagger.util.ResponseDeserializer.class, io.swagger.util.SecurityDefinitionDeserializer.class, io.swagger.util.Yaml.class, io.swagger.models.AbstractModel.class, io.swagger.models.ArrayModel.class, io.swagger.models.ComposedModel.class, io.swagger.models.Contact.class, io.swagger.models.ExternalDocs.class, io.swagger.models.HttpMethod.class, io.swagger.models.Info.class, io.swagger.models.License.class, io.swagger.models.Model.class, io.swagger.models.ModelImpl.class, io.swagger.models.Operation.class, io.swagger.models.Path.class, io.swagger.models.RefModel.class, io.swagger.models.RefPath.class, io.swagger.models.RefResponse.class, io.swagger.models.Response.class, io.swagger.models.Scheme.class, io.swagger.models.SecurityRequirement.class, io.swagger.models.SecurityScope.class, io.swagger.models.Swagger.class, io.swagger.models.Tag.class, io.swagger.models.Xml.class, io.swagger.models.auth.AbstractSecuritySchemeDefinition.class, io.swagger.models.auth.ApiKeyAuthDefinition.class, io.swagger.models.auth.AuthorizationValue.class, io.swagger.models.auth.BasicAuthDefinition.class, io.swagger.models.auth.In.class, io.swagger.models.auth.OAuth2Definition.class, io.swagger.models.auth.SecuritySchemeDefinition.class, io.swagger.models.parameters.AbstractParameter.class, io.swagger.models.parameters.AbstractSerializableParameter.class, io.swagger.models.parameters.BodyParameter.class, io.swagger.models.parameters.CookieParameter.class, io.swagger.models.parameters.FormParameter.class, io.swagger.models.parameters.HeaderParameter.class, io.swagger.models.parameters.Parameter.class, io.swagger.models.parameters.PathParameter.class, io.swagger.models.parameters.QueryParameter.class, io.swagger.models.parameters.RefParameter.class, io.swagger.models.parameters.SerializableParameter.class, io.swagger.models.properties.AbstractNumericProperty.class, io.swagger.models.properties.AbstractProperty.class, io.swagger.models.properties.ArrayProperty.class, io.swagger.models.properties.BaseIntegerProperty.class, io.swagger.models.properties.BinaryProperty.class, io.swagger.models.properties.BooleanProperty.class, io.swagger.models.properties.ByteArrayProperty.class, io.swagger.models.properties.ComposedProperty.class, io.swagger.models.properties.DateProperty.class, io.swagger.models.properties.DateTimeProperty.class, io.swagger.models.properties.DecimalProperty.class, io.swagger.models.properties.DoubleProperty.class, io.swagger.models.properties.EmailProperty.class, io.swagger.models.properties.FileProperty.class, io.swagger.models.properties.FloatProperty.class, io.swagger.models.properties.IntegerProperty.class, io.swagger.models.properties.LongProperty.class, io.swagger.models.properties.MapProperty.class, io.swagger.models.properties.ObjectProperty.class, io.swagger.models.properties.PasswordProperty.class, io.swagger.models.properties.Property.class, io.swagger.models.properties.PropertyBuilder.class, io.swagger.models.properties.RefProperty.class, io.swagger.models.properties.StringProperty.class, io.swagger.models.properties.UUIDProperty.class, io.swagger.models.properties.UntypedProperty.class, io.swagger.models.refs.GenericRef.class, io.swagger.models.refs.RefFormat.class, io.swagger.models.refs.RefType.class, io.swagger.models.utils.PropertyModelConverter.class, io.swagger.annotations.Api.class, io.swagger.annotations.ApiImplicitParam.class, io.swagger.annotations.ApiImplicitParams.class, io.swagger.annotations.ApiKeyAuthDefinition.class, io.swagger.annotations.ApiModel.class, io.swagger.annotations.ApiModelProperty.class, io.swagger.annotations.ApiOperation.class, io.swagger.annotations.ApiParam.class, io.swagger.annotations.ApiResponse.class, io.swagger.annotations.ApiResponses.class, io.swagger.annotations.Authorization.class, io.swagger.annotations.AuthorizationScope.class, io.swagger.annotations.BasicAuthDefinition.class, io.swagger.annotations.Contact.class, io.swagger.annotations.Example.class, io.swagger.annotations.ExampleProperty.class, io.swagger.annotations.Extension.class, io.swagger.annotations.ExtensionProperty.class, io.swagger.annotations.ExternalDocs.class, io.swagger.annotations.Info.class, io.swagger.annotations.License.class, io.swagger.annotations.OAuth2Definition.class, io.swagger.annotations.ResponseHeader.class, io.swagger.annotations.Scope.class, io.swagger.annotations.SecurityDefinition.class, io.swagger.annotations.SwaggerDefinition.class, io.swagger.annotations.Tag.class, io.swagger.parser.SwaggerParserExtension.class, io.swagger.parser.processors.ModelProcessor.class, io.swagger.parser.processors.PathsProcessor.class, io.swagger.parser.processors.DefinitionsProcessor.class, io.swagger.parser.processors.ResponseProcessor.class, io.swagger.parser.processors.ParameterProcessor.class, io.swagger.parser.processors.OperationProcessor.class, io.swagger.parser.processors.ExternalRefProcessor.class, io.swagger.parser.processors.PropertyProcessor.class, io.swagger.parser.SwaggerResolver.class, io.swagger.parser.SwaggerParser.class, io.swagger.parser.ResolverOptions.class, io.swagger.parser.ResolverCache.class, io.swagger.parser.util.RemoteUrl.class, io.swagger.parser.util.DeserializationUtils.class, io.swagger.parser.util.SwaggerDeserializationResult.class, io.swagger.parser.util.ManagedValue.class, io.swagger.parser.util.PathUtils.class, io.swagger.parser.util.ClasspathHelper.class, io.swagger.parser.util.ParseOptions.class, io.swagger.parser.util.SwaggerDeserializer.class, io.swagger.parser.util.HostAuthorizationValue.class, io.swagger.parser.util.InlineModelResolver.class, io.swagger.parser.util.RefUtils.class, io.swagger.parser.Swagger20Parser.class, io.swagger.v3.parser.core.extensions.SwaggerParserExtension.class, io.swagger.v3.parser.core.models.AuthorizationValue.class, io.swagger.v3.parser.core.models.SwaggerParseResult.class, io.swagger.v3.parser.core.models.ParseOptions.class, io.swagger.v3.parser.processors.ExampleProcessor.class, io.swagger.v3.parser.processors.PathsProcessor.class, io.swagger.v3.parser.processors.SecuritySchemeProcessor.class, io.swagger.v3.parser.processors.HeaderProcessor.class, io.swagger.v3.parser.processors.SchemaProcessor.class, io.swagger.v3.parser.processors.RequestBodyProcessor.class, io.swagger.v3.parser.processors.CallbackProcessor.class, io.swagger.v3.parser.processors.ResponseProcessor.class, io.swagger.v3.parser.processors.ComponentsProcessor.class, io.swagger.v3.parser.processors.ParameterProcessor.class, io.swagger.v3.parser.processors.OperationProcessor.class, io.swagger.v3.parser.processors.LinkProcessor.class, io.swagger.v3.parser.processors.ExternalRefProcessor.class, io.swagger.v3.parser.OpenAPIResolver.class, io.swagger.v3.parser.ObjectMapperFactory.class, io.swagger.v3.parser.OpenAPIV3Parser.class, io.swagger.v3.parser.ResolverCache.class, io.swagger.v3.parser.util.RemoteUrl.class, io.swagger.v3.parser.util.DeserializationUtils.class, io.swagger.v3.parser.util.ReferenceValidator.class, io.swagger.v3.parser.util.ManagedValue.class, io.swagger.v3.parser.util.PathUtils.class, io.swagger.v3.parser.util.ClasspathHelper.class, io.swagger.v3.parser.util.ResolverFully.class, io.swagger.v3.parser.util.SchemaTypeUtil.class, io.swagger.v3.parser.util.InlineModelResolver.class, io.swagger.v3.parser.util.RefUtils.class, io.swagger.v3.parser.util.OpenAPIDeserializer.class, io.swagger.v3.parser.exception.ReadContentException.class, io.swagger.v3.parser.exception.EncodingNotSupportedException.class, io.swagger.v3.parser.models.RefType.class, io.swagger.v3.parser.models.RefFormat.class


})
public class ReflectionConfig {
}
Loading

0 comments on commit a1b5932

Please sign in to comment.