typeParameters = resourceType.getTypeParameters();
- Class> type = typeParameters.get(0).getErasedType();
-
- return Stream.of(
- resolver.resolve(
- EmbeddedCollection.class,
- type),
- resolver.resolve(Link.class)
- ).collect(toSet());
- }
-
- @Override
- public boolean supports(ModelContext delimiter) {
- return CollectionModel.class.equals(resourceType(delimiter.getType()).getErasedType())
- && (delimiter.getDocumentationType() == DocumentationType.SWAGGER_2
- || delimiter.getDocumentationType() == DocumentationType.OAS_30);
- }
-
- private ResolvedType resourceType(Type type) {
- return resolver.resolve(type);
- }
-}
diff --git a/springfox-data-rest/src/main/java/springfox/documentation/spring/data/rest/schema/SpringDataRestSchemaExtensions.java b/springfox-data-rest/src/main/java/springfox/documentation/spring/data/rest/schema/SpringDataRestSchemaExtensions.java
deleted file mode 100644
index c4b8f452410..00000000000
--- a/springfox-data-rest/src/main/java/springfox/documentation/spring/data/rest/schema/SpringDataRestSchemaExtensions.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *
- * Copyright 2017-2019 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- */
-package springfox.documentation.spring.data.rest.schema;
-
-import com.fasterxml.classmate.TypeResolver;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.hateoas.server.LinkRelationProvider;
-import springfox.documentation.schema.TypeNameExtractor;
-import springfox.documentation.schema.property.ModelSpecificationFactory;
-import springfox.documentation.spi.schema.EnumTypeDeterminer;
-
-@Configuration
-public class SpringDataRestSchemaExtensions {
-
- @Bean
- public ResourcesModelProvider resourcesModelProvider(
- TypeResolver resolver,
- TypeNameExtractor typeNameExtractor,
- EnumTypeDeterminer enumTypeDeterminer) {
- return new ResourcesModelProvider(resolver, typeNameExtractor, enumTypeDeterminer,
- new ModelSpecificationFactory(typeNameExtractor, enumTypeDeterminer));
- }
-
- @Bean
- public EmbeddedCollectionModelProvider embeddedCollectionProvider(
- TypeResolver resolver,
- @Qualifier("_relProvider")
- LinkRelationProvider relProvider,
- TypeNameExtractor typeNameExtractor,
- EnumTypeDeterminer enumTypeDeterminer) {
- return new EmbeddedCollectionModelProvider(resolver, relProvider, typeNameExtractor, enumTypeDeterminer,
- new ModelSpecificationFactory(typeNameExtractor, enumTypeDeterminer));
- }
-}
diff --git a/springfox-oas/build.gradle b/springfox-oas/build.gradle
deleted file mode 100644
index 9a8f4e098f4..00000000000
--- a/springfox-oas/build.gradle
+++ /dev/null
@@ -1,51 +0,0 @@
-plugins {
- id "net.ltgt.apt-idea" version "0.21"
-}
-
-ext {
- limits = [
- 'instruction': 96,
- 'branch' : 84,
- 'line' : 96.5,
- 'complexity' : 87,
- 'method' : 95,
- 'class' : 100
- ]
-}
-
-dependencies {
- api libs.oasCore
- api project(':springfox-spi')
- api project(':springfox-schema')
- api project(':springfox-core')
- api project(':springfox-spring-web')
- api project(':springfox-spring-webmvc')
- api project(':springfox-spring-webflux')
- api project(':springfox-swagger-common')
- api libs.core
- api libs.spring
-
- implementation "org.mapstruct:mapstruct:$mapstruct"
- annotationProcessor "org.mapstruct:mapstruct-processor:$mapstruct"
-
- compileOnly libs.springProvidedWithMvc
- compileOnly "org.springframework:spring-webflux:$spring"
- compileOnly "org.springframework.boot:spring-boot-autoconfigure:$springBoot"
- compileOnly "javax.servlet:javax.servlet-api:$servlet"
- compileOnly libs.clientProvided
-
- testImplementation project(':springfox-core').sourceSets.test.output
- testImplementation project(':springfox-schema').sourceSets.test.output
- testImplementation project(':springfox-spring-web').sourceSets.test.output
-
- testImplementation libs.test
- testImplementation "org.skyscreamer:jsonassert:${jsonAssert}"
- testImplementation libs.clientProvided
-}
-
-compileJava {
- options.compilerArgs += [
- "-Amapstruct.defaultComponentModel=spring",
- "-Amapstruct.unmappedTargetPolicy=ERROR"
- ]
-}
\ No newline at end of file
diff --git a/springfox-oas/src/main/java/springfox/documentation/oas/annotations/EnableOpenApi.java b/springfox-oas/src/main/java/springfox/documentation/oas/annotations/EnableOpenApi.java
deleted file mode 100644
index 57d17eead3a..00000000000
--- a/springfox-oas/src/main/java/springfox/documentation/oas/annotations/EnableOpenApi.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *
- * Copyright 2017-2018 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- */
-
-package springfox.documentation.oas.annotations;
-
-import org.springframework.context.annotation.Import;
-import springfox.documentation.oas.configuration.OpenApiDocumentationConfiguration;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Indicates that Swagger support should be enabled.
- *
- * This should be applied to a Spring java config and should have an accompanying '@Configuration' annotation.
- *
- * Loads all required beans defined in @see SpringSwaggerConfig
- *
- * @see springfox.documentation.spring.web.plugins.Docket
- */
-@Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
-@Target(value = {java.lang.annotation.ElementType.TYPE})
-@Documented
-@Import(OpenApiDocumentationConfiguration.class)
-public @interface EnableOpenApi {
-}
diff --git a/springfox-oas/src/main/java/springfox/documentation/oas/configuration/OpenApiDocumentationConfiguration.java b/springfox-oas/src/main/java/springfox/documentation/oas/configuration/OpenApiDocumentationConfiguration.java
deleted file mode 100644
index 4311e77b09a..00000000000
--- a/springfox-oas/src/main/java/springfox/documentation/oas/configuration/OpenApiDocumentationConfiguration.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * Copyright 2017-2018 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- */
-
-package springfox.documentation.oas.configuration;
-
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Import;
-import springfox.documentation.spring.web.SpringfoxWebConfiguration;
-import springfox.documentation.spring.web.SpringfoxWebFluxConfiguration;
-import springfox.documentation.spring.web.SpringfoxWebMvcConfiguration;
-import springfox.documentation.swagger.configuration.SwaggerCommonConfiguration;
-
-@Configuration
-@Import({
- SpringfoxWebConfiguration.class,
- SpringfoxWebMvcConfiguration.class,
- SpringfoxWebFluxConfiguration.class,
- SwaggerCommonConfiguration.class,
- OpenApiMappingConfiguration.class,
- OpenApiWebMvcConfiguration.class,
- OpenApiWebFluxConfiguration.class
-})
-@ComponentScan(basePackages = {
- "springfox.documentation.oas.web",
- "springfox.documentation.oas.mappers"
-})
-public class OpenApiDocumentationConfiguration {
-}
diff --git a/springfox-oas/src/main/java/springfox/documentation/oas/configuration/OpenApiJacksonModule.java b/springfox-oas/src/main/java/springfox/documentation/oas/configuration/OpenApiJacksonModule.java
deleted file mode 100644
index a1853be1866..00000000000
--- a/springfox-oas/src/main/java/springfox/documentation/oas/configuration/OpenApiJacksonModule.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- *
- * Copyright 2015-2019 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- */
-
-package springfox.documentation.oas.configuration;
-
-import com.fasterxml.jackson.annotation.JsonAutoDetect;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.SerializationFeature;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-import io.swagger.v3.oas.models.Components;
-import io.swagger.v3.oas.models.OpenAPI;
-import io.swagger.v3.oas.models.Operation;
-import io.swagger.v3.oas.models.PathItem;
-import io.swagger.v3.oas.models.examples.Example;
-import io.swagger.v3.oas.models.info.Contact;
-import io.swagger.v3.oas.models.info.Info;
-import io.swagger.v3.oas.models.info.License;
-import io.swagger.v3.oas.models.media.Content;
-import io.swagger.v3.oas.models.media.Encoding;
-import io.swagger.v3.oas.models.media.MediaType;
-import io.swagger.v3.oas.models.media.Schema;
-import io.swagger.v3.oas.models.media.XML;
-import io.swagger.v3.oas.models.parameters.Parameter;
-import io.swagger.v3.oas.models.parameters.RequestBody;
-import io.swagger.v3.oas.models.responses.ApiResponse;
-import io.swagger.v3.oas.models.responses.ApiResponses;
-import io.swagger.v3.oas.models.security.SecurityScheme;
-import io.swagger.v3.oas.models.servers.Server;
-import io.swagger.v3.oas.models.tags.Tag;
-import springfox.documentation.spring.web.json.JacksonModuleRegistrar;
-
-import static com.fasterxml.jackson.annotation.JsonInclude.*;
-
-public class OpenApiJacksonModule extends SimpleModule implements JacksonModuleRegistrar {
-
- public void maybeRegisterModule(ObjectMapper mapper) {
- if (mapper.findMixInClassFor(OpenAPI.class) == null) {
- mapper.registerModule(this);
- mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
- mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
- mapper.configure(SerializationFeature.WRITE_ENUMS_USING_TO_STRING, true);
- mapper.setSerializationInclusion(Include.NON_NULL);
- }
- }
-
- @Override
- public void setupModule(SetupContext context) {
- super.setupModule(context);
- context.setMixInAnnotations(OpenAPI.class, NonEmptyMixin.class);
- context.setMixInAnnotations(Info.class, NonEmptyMixin.class);
- context.setMixInAnnotations(License.class, NonEmptyMixin.class);
- context.setMixInAnnotations(Schema.class, NonEmptyMixin.class);
- context.setMixInAnnotations(PathItem.class, NonEmptyMixin.class);
- context.setMixInAnnotations(Content.class, NonEmptyMixin.class);
- context.setMixInAnnotations(MediaType.class, NonEmptyMixin.class);
- context.setMixInAnnotations(SecurityScheme.class, NonEmptyMixin.class);
- context.setMixInAnnotations(Operation.class, NonEmptyMixin.class);
- context.setMixInAnnotations(ApiResponses.class, NonEmptyMixin.class);
- context.setMixInAnnotations(ApiResponse.class, NonEmptyMixin.class);
- context.setMixInAnnotations(Parameter.class, NonEmptyMixin.class);
- context.setMixInAnnotations(RequestBody.class, NonEmptyMixin.class);
- context.setMixInAnnotations(Encoding.class, NonEmptyMixin.class);
- context.setMixInAnnotations(Components.class, NonEmptyMixin.class);
- context.setMixInAnnotations(Contact.class, NonEmptyMixin.class);
- context.setMixInAnnotations(Server.class, NonEmptyMixin.class);
-// context.setMixInAnnotations(ExternalDocs.class, CustomizedSwaggerSerializer.class);
- context.setMixInAnnotations(XML.class, NonEmptyMixin.class);
- context.setMixInAnnotations(Tag.class, NonEmptyMixin.class);
- context.setMixInAnnotations(Contact.class, NonEmptyMixin.class);
- context.setMixInAnnotations(Example.class, NonEmptyMixin.class);
-
- }
-
- @JsonAutoDetect
- @JsonInclude(value = Include.NON_EMPTY)
- private class NonEmptyMixin {
- }
-}
diff --git a/springfox-oas/src/main/java/springfox/documentation/oas/configuration/OpenApiMappingConfiguration.java b/springfox-oas/src/main/java/springfox/documentation/oas/configuration/OpenApiMappingConfiguration.java
deleted file mode 100644
index 0a678719990..00000000000
--- a/springfox-oas/src/main/java/springfox/documentation/oas/configuration/OpenApiMappingConfiguration.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package springfox.documentation.oas.configuration;
-
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import springfox.documentation.spring.web.json.JacksonModuleRegistrar;
-
-@Configuration
-public class OpenApiMappingConfiguration {
- @Bean
- public JacksonModuleRegistrar openApiModule() {
- return new OpenApiJacksonModule();
- }
-}
diff --git a/springfox-oas/src/main/java/springfox/documentation/oas/configuration/OpenApiWebFluxConfiguration.java b/springfox-oas/src/main/java/springfox/documentation/oas/configuration/OpenApiWebFluxConfiguration.java
deleted file mode 100644
index ac73c57f0b4..00000000000
--- a/springfox-oas/src/main/java/springfox/documentation/oas/configuration/OpenApiWebFluxConfiguration.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package springfox.documentation.oas.configuration;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Conditional;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.plugin.core.config.EnablePluginRegistries;
-import springfox.documentation.oas.web.WebFluxBasePathAndHostnameTransformationFilter;
-import springfox.documentation.oas.web.WebFluxOpenApiTransformationFilter;
-import springfox.documentation.spring.web.OnReactiveWebApplication;
-
-import static springfox.documentation.oas.web.SpecGeneration.*;
-
-@Configuration
-@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.REACTIVE)
-@Conditional(OnReactiveWebApplication.class)
-@EnablePluginRegistries(WebFluxOpenApiTransformationFilter.class)
-public class OpenApiWebFluxConfiguration {
- @Bean
- public WebFluxOpenApiTransformationFilter webMvcOpenApiTransformer(
- @Value(OPEN_API_SPECIFICATION_PATH) String oasPath) {
- return new WebFluxBasePathAndHostnameTransformationFilter(oasPath);
- }
-}
diff --git a/springfox-oas/src/main/java/springfox/documentation/oas/configuration/OpenApiWebMvcConfiguration.java b/springfox-oas/src/main/java/springfox/documentation/oas/configuration/OpenApiWebMvcConfiguration.java
deleted file mode 100644
index 94d34fa1146..00000000000
--- a/springfox-oas/src/main/java/springfox/documentation/oas/configuration/OpenApiWebMvcConfiguration.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package springfox.documentation.oas.configuration;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Conditional;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.plugin.core.config.EnablePluginRegistries;
-import springfox.documentation.oas.web.WebMvcBasePathAndHostnameTransformationFilter;
-import springfox.documentation.oas.web.WebMvcOpenApiTransformationFilter;
-import springfox.documentation.spring.web.OnServletBasedWebApplication;
-
-import static springfox.documentation.oas.web.SpecGeneration.*;
-
-@Configuration
-@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
-@Conditional(OnServletBasedWebApplication.class)
-@EnablePluginRegistries(WebMvcOpenApiTransformationFilter.class)
-public class OpenApiWebMvcConfiguration {
- @Bean
- public WebMvcOpenApiTransformationFilter webMvcOpenApiTransformer(
- @Value(OPEN_API_SPECIFICATION_PATH) String oasPath) {
- return new WebMvcBasePathAndHostnameTransformationFilter(oasPath);
- }
-}
diff --git a/springfox-oas/src/main/java/springfox/documentation/oas/mappers/CollectionSpecificationToSchemaConverter.java b/springfox-oas/src/main/java/springfox/documentation/oas/mappers/CollectionSpecificationToSchemaConverter.java
deleted file mode 100644
index c8a9744f2e9..00000000000
--- a/springfox-oas/src/main/java/springfox/documentation/oas/mappers/CollectionSpecificationToSchemaConverter.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package springfox.documentation.oas.mappers;
-
-import io.swagger.v3.oas.models.media.ArraySchema;
-import io.swagger.v3.oas.models.media.ByteArraySchema;
-import io.swagger.v3.oas.models.media.Schema;
-import org.mapstruct.factory.Mappers;
-import org.springframework.core.convert.converter.Converter;
-import springfox.documentation.schema.CollectionSpecification;
-import springfox.documentation.schema.CollectionType;
-import springfox.documentation.schema.ScalarModelSpecification;
-import springfox.documentation.schema.ScalarType;
-import springfox.documentation.service.ModelNamesRegistry;
-
-public class CollectionSpecificationToSchemaConverter implements Converter> {
- private final ModelNamesRegistry modelNamesRegistry;
-
- public CollectionSpecificationToSchemaConverter(ModelNamesRegistry modelNamesRegistry) {
- this.modelNamesRegistry = modelNamesRegistry;
- }
-
- @Override
- public Schema> convert(CollectionSpecification source) {
- ArraySchema arraySchema = new ArraySchema();
- if (source.getModel().getScalar()
- .map(ScalarModelSpecification::getType).orElse(null) == ScalarType.BYTE) {
- return new ByteArraySchema();
- } else {
- arraySchema.items(Mappers.getMapper(SchemaMapper.class).mapFrom(source.getModel(), modelNamesRegistry));
- }
- if (source.getCollectionType() == CollectionType.SET) {
- arraySchema.uniqueItems(true);
- }
- return arraySchema;
- }
-}
diff --git a/springfox-oas/src/main/java/springfox/documentation/oas/mappers/CompoundSpecificationToSchemaConverter.java b/springfox-oas/src/main/java/springfox/documentation/oas/mappers/CompoundSpecificationToSchemaConverter.java
deleted file mode 100644
index ae87d4c5b6b..00000000000
--- a/springfox-oas/src/main/java/springfox/documentation/oas/mappers/CompoundSpecificationToSchemaConverter.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package springfox.documentation.oas.mappers;
-
-import io.swagger.v3.oas.models.media.ObjectSchema;
-import io.swagger.v3.oas.models.media.Schema;
-import org.mapstruct.factory.Mappers;
-import org.springframework.core.convert.converter.Converter;
-import springfox.documentation.schema.CompoundModelSpecification;
-import springfox.documentation.service.ModelNamesRegistry;
-
-import java.util.Objects;
-import java.util.stream.Collectors;
-
-public class CompoundSpecificationToSchemaConverter implements Converter> {
- private final ModelNamesRegistry modelNamesRegistry;
-
- public CompoundSpecificationToSchemaConverter(ModelNamesRegistry modelNamesRegistry) {
- this.modelNamesRegistry = modelNamesRegistry;
- }
-
- @Override
- public Schema> convert(CompoundModelSpecification source) {
- ObjectSchema schema = new ObjectSchema();
- schema.properties(source.getProperties().stream()
- .map(p -> {
- Schema> property = Mappers.getMapper(SchemaMapper.class)
- .mapFrom(p.getType(), modelNamesRegistry);
- if (property != null) {
- return property.name(p.getName());
- }
- return null;
- })
- .filter(Objects::nonNull)
- .collect(Collectors.toMap(Schema::getName, s -> s)));
- return schema;
- }
-}
diff --git a/springfox-oas/src/main/java/springfox/documentation/oas/mappers/ExamplesMapper.java b/springfox-oas/src/main/java/springfox/documentation/oas/mappers/ExamplesMapper.java
deleted file mode 100644
index d729e7c6056..00000000000
--- a/springfox-oas/src/main/java/springfox/documentation/oas/mappers/ExamplesMapper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package springfox.documentation.oas.mappers;
-
-import org.mapstruct.AfterMapping;
-import org.mapstruct.Mapper;
-import org.mapstruct.Mapping;
-import org.mapstruct.MappingTarget;
-import org.mapstruct.Mappings;
-import springfox.documentation.schema.Example;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.TreeMap;
-
-@Mapper(componentModel = "spring", uses = VendorExtensionsMapper.class)
-public interface ExamplesMapper {
- default Map mapExamples(Collection from) {
- Map examples = new TreeMap<>();
- for (Example each : from) {
- examples.put(
- each.getId(),
- toOasExample(each));
- }
- return examples;
- }
-
- @AfterMapping
- default void afterMappingParameter(
- Example from,
- @MappingTarget io.swagger.v3.oas.models.examples.Example target) {
- target.extensions(new VendorExtensionsMapper().mapExtensions(from.getExtensions()));
- }
-
- @Mappings({
- @Mapping(target = "$ref", ignore = true),
- @Mapping(target = "extensions", ignore = true)
- })
- io.swagger.v3.oas.models.examples.Example toOasExample(Example from);
-}
diff --git a/springfox-oas/src/main/java/springfox/documentation/oas/mappers/LicenseMapper.java b/springfox-oas/src/main/java/springfox/documentation/oas/mappers/LicenseMapper.java
deleted file mode 100644
index 896164c4448..00000000000
--- a/springfox-oas/src/main/java/springfox/documentation/oas/mappers/LicenseMapper.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *
- * Copyright 2017-2018 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- */
-package springfox.documentation.oas.mappers;
-
-import org.mapstruct.Mapper;
-import org.mapstruct.Qualifier;
-import springfox.documentation.service.ApiInfo;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Mapper(componentModel = "spring", implementationName = "OasLicenceMapper")
-public class LicenseMapper {
-
- @License
- public io.swagger.v3.oas.models.info.License apiInfoToLicense(ApiInfo from) {
- if (from.getLicense() == null && from.getLicenseUrl() == null) {
- return null;
- }
- return new io.swagger.v3.oas.models.info.License().name(from.getLicense()).url(from.getLicenseUrl());
- }
-
-
- @Qualifier
- @Target(ElementType.TYPE)
- @Retention(RetentionPolicy.SOURCE)
- @interface LicenseTranslator {
- }
-
- @Qualifier
- @Target(ElementType.METHOD)
- @Retention(RetentionPolicy.SOURCE)
- public @interface License {
- }
-}
\ No newline at end of file
diff --git a/springfox-oas/src/main/java/springfox/documentation/oas/mappers/MapSchema.java b/springfox-oas/src/main/java/springfox/documentation/oas/mappers/MapSchema.java
deleted file mode 100644
index a7fa99d628c..00000000000
--- a/springfox-oas/src/main/java/springfox/documentation/oas/mappers/MapSchema.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Copyright 2017 SmartBear Software
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package springfox.documentation.oas.mappers;
-
-import io.swagger.v3.oas.models.media.Schema;
-
-import java.util.Objects;
-
-/**
- * MapSchema
- */
-
-public class MapSchema extends Schema