From 95787e33a3bd752bd0e13aaa3decff7841d8f0ab Mon Sep 17 00:00:00 2001 From: frantuma Date: Wed, 25 Oct 2017 17:25:11 +0200 Subject: [PATCH] refs #2485 - rename annotations root package --- .../annotations/ExternalDocumentation.java | 2 +- .../oas/annotations/OpenAPIDefinition.java | 10 +-- .../{ => v3}/oas/annotations/Operation.java | 10 +-- .../{ => v3}/oas/annotations/Parameter.java | 16 ++-- .../{ => v3}/oas/annotations/Parameters.java | 2 +- .../oas/annotations/callbacks/Callback.java | 4 +- .../oas/annotations/callbacks/Callbacks.java | 2 +- .../oas/annotations/enums/Explode.java | 2 +- .../oas/annotations/enums/ParameterIn.java | 2 +- .../oas/annotations/enums/ParameterStyle.java | 2 +- .../annotations/enums/SecuritySchemeIn.java | 2 +- .../annotations/enums/SecuritySchemeType.java | 2 +- .../oas/annotations/extensions/Extension.java | 2 +- .../extensions/ExtensionProperty.java | 2 +- .../annotations/extensions/Extensions.java | 2 +- .../oas/annotations/headers/Header.java | 4 +- .../oas/annotations/info/Contact.java | 2 +- .../{ => v3}/oas/annotations/info/Info.java | 2 +- .../oas/annotations/info/License.java | 2 +- .../{ => v3}/oas/annotations/links/Link.java | 4 +- .../oas/annotations/links/LinkParameter.java | 2 +- .../oas/annotations/media/ArraySchema.java | 2 +- .../oas/annotations/media/Content.java | 2 +- .../media/DiscriminatorMapping.java | 2 +- .../oas/annotations/media/Encoding.java | 4 +- .../oas/annotations/media/ExampleObject.java | 2 +- .../oas/annotations/media/Schema.java | 4 +- .../annotations/parameters/RequestBody.java | 4 +- .../annotations/responses/ApiResponse.java | 8 +- .../annotations/responses/ApiResponses.java | 2 +- .../oas/annotations/security/OAuthFlow.java | 2 +- .../oas/annotations/security/OAuthFlows.java | 2 +- .../oas/annotations/security/OAuthScope.java | 2 +- .../security/SecurityRequirement.java | 2 +- .../security/SecurityRequirements.java | 2 +- .../annotations/security/SecurityScheme.java | 6 +- .../annotations/security/SecuritySchemes.java | 2 +- .../oas/annotations/servers/Server.java | 2 +- .../annotations/servers/ServerVariable.java | 2 +- .../oas/annotations/servers/Servers.java | 2 +- .../{ => v3}/oas/annotations/tags/Tag.java | 4 +- .../{ => v3}/oas/annotations/tags/Tags.java | 2 +- .../io/swagger/jackson/ModelResolver.java | 78 +++++++++---------- .../SwaggerAnnotationIntrospector.java | 2 +- .../io/swagger/jackson/TypeNameResolver.java | 2 +- .../io/swagger/util/AnnotationsUtils.java | 48 ++++++------ .../java/io/swagger/util/BaseReaderUtils.java | 4 +- .../io/swagger/util/ParameterProcessor.java | 57 +++++++------- .../converting/ModelConverterTest.java | 10 +-- .../swagger/converting/NumericFormatTest.java | 6 +- .../java/io/swagger/converting/PojoTest.java | 2 +- .../override/ModelPropertyOverrideTest.java | 2 +- .../models/ApiFirstRequiredFieldModel.java | 2 +- .../test/java/io/swagger/oas/models/Car.java | 2 +- .../test/java/io/swagger/oas/models/Cat.java | 2 +- .../io/swagger/oas/models/ClientOptInput.java | 2 +- .../io/swagger/oas/models/Department.java | 2 +- .../java/io/swagger/oas/models/Employee.java | 2 +- .../java/io/swagger/oas/models/Issue534.java | 2 +- .../swagger/oas/models/JCovariantGetter.java | 2 +- .../test/java/io/swagger/oas/models/Link.java | 2 +- .../java/io/swagger/oas/models/Model1979.java | 2 +- .../oas/models/ModelWithAltPropertyName.java | 2 +- .../swagger/oas/models/ModelWithApiModel.java | 2 +- .../oas/models/ModelWithBooleanProperty.java | 2 +- .../ModelWithModelPropertyOverrides.java | 4 +- .../swagger/oas/models/ModelWithOffset.java | 2 +- .../swagger/oas/models/ModelWithRanges.java | 2 +- .../swagger/oas/models/ModelWithTuple2.java | 6 +- .../io/swagger/oas/models/ReadOnlyFields.java | 2 +- .../io/swagger/oas/models/ReadOnlyModel.java | 2 +- .../models/XmlFirstRequiredFieldModel.java | 2 +- .../AbstractBaseModelWithSubTypes.java | 2 +- .../AbstractBaseModelWithoutFields.java | 2 +- .../AbstractModelWithApiModel.java | 2 +- .../ModelWithFieldWithSubTypes.java | 2 +- .../swagger/oas/models/composition/Pet.java | 2 +- .../oas/models/composition/PetClass.java | 2 +- .../oas/models/composition/Thing1.java | 2 +- .../oas/models/composition/Thing2.java | 2 +- .../oas/models/composition/Thing3.java | 2 +- .../resolving/BaseReaderUtilsTest.java | 6 +- .../io/swagger/resolving/HiddenFieldTest.java | 6 +- .../swagger/resolving/InheritedBeanTest.java | 32 ++++---- .../resolving/JodaDateTimeConverterTest.java | 4 +- .../resolving/JodaLocalDateConverterTest.java | 4 +- .../java/io/swagger/resolving/JodaTest.java | 4 +- .../resolving/SimpleGenerationTest.java | 2 +- .../resolving/XMLGregorianCalendarTest.java | 4 +- .../io/swagger/resolving/XMLInfoTest.java | 7 +- .../util/reflection/ReflectionUtilsTest.java | 5 +- .../util/reflection/resources/Parent.java | 2 +- .../jaxrs2/DefaultParameterExtension.java | 4 +- .../io/swagger/jaxrs2/OperationParser.java | 19 ++--- .../main/java/io/swagger/jaxrs2/Reader.java | 63 ++++++++------- .../io/swagger/jaxrs2/SecurityParser.java | 16 ++-- .../AcceptHeaderOpenApiResource.java | 2 +- .../resources/OpenApiResource.java | 2 +- .../project/resources/ResourceInPackageA.java | 4 +- .../java/io/swagger/jaxrs2/ReaderTest.java | 3 +- .../annotations/callbacks/CallbackTest.java | 16 ++-- .../annotations/encoding/EncodingTest.java | 18 ++--- .../annotations/examples/ExamplesTest.java | 18 ++--- .../jaxrs2/annotations/info/InfoTest.java | 8 +- .../AnnotatedOperationMethodTest.java | 18 ++--- .../operations/MergedOperationTest.java | 6 +- .../parameters/ParametersTest.java | 18 ++--- .../pathItems/OperationsWithLinksTest.java | 12 +-- .../annotations/requests/RequestBodyTest.java | 8 +- .../annotations/security/SecurityTests.java | 14 ++-- .../jaxrs2/resources/BasicFieldsResource.java | 12 +-- .../resources/CompleteFieldsResource.java | 14 ++-- .../resources/DeprecatedFieldsResource.java | 4 +- .../DuplicatedOperationIdResource.java | 2 +- .../resources/DuplicatedSecurityResource.java | 16 ++-- .../resources/ExternalDocsReference.java | 4 +- .../jaxrs2/resources/HiddenUserResource.java | 4 +- .../jaxrs2/resources/ParametersResource.java | 8 +- .../swagger/jaxrs2/resources/PetResource.java | 10 +-- .../resources/ReaderListenerResource.java | 8 +- .../ResourceWithKnownInjections.java | 4 +- .../jaxrs2/resources/ResponsesResource.java | 8 +- .../jaxrs2/resources/SecurityResource.java | 12 ++- .../resources/SimpleCallbackResource.java | 12 +-- .../jaxrs2/resources/SimpleUserResource.java | 4 +- .../jaxrs2/resources/TagsResource.java | 2 +- .../jaxrs2/resources/UserResource.java | 12 +-- .../swagger/jaxrs2/resources/model/Pet.java | 2 +- .../swagger/jaxrs2/resources/model/User.java | 2 +- .../project/resources/ResourceInPackageB.java | 4 +- pom.xml | 10 ++- 131 files changed, 452 insertions(+), 440 deletions(-) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/ExternalDocumentation.java (97%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/OpenAPIDefinition.java (89%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/Operation.java (92%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/Parameter.java (92%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/Parameters.java (96%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/callbacks/Callback.java (94%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/callbacks/Callbacks.java (96%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/enums/Explode.java (53%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/enums/ParameterIn.java (87%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/enums/ParameterStyle.java (90%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/enums/SecuritySchemeIn.java (87%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/enums/SecuritySchemeType.java (88%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/extensions/Extension.java (94%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/extensions/ExtensionProperty.java (92%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/extensions/Extensions.java (96%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/headers/Header.java (95%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/info/Contact.java (96%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/info/Info.java (97%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/info/License.java (96%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/links/Link.java (96%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/links/LinkParameter.java (96%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/media/ArraySchema.java (96%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/media/Content.java (97%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/media/DiscriminatorMapping.java (96%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/media/Encoding.java (95%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/media/ExampleObject.java (97%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/media/Schema.java (98%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/parameters/RequestBody.java (93%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/responses/ApiResponse.java (91%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/responses/ApiResponses.java (95%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/security/OAuthFlow.java (97%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/security/OAuthFlows.java (97%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/security/OAuthScope.java (95%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/security/SecurityRequirement.java (96%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/security/SecurityRequirements.java (96%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/security/SecurityScheme.java (94%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/security/SecuritySchemes.java (96%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/servers/Server.java (97%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/servers/ServerVariable.java (97%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/servers/Servers.java (96%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/tags/Tag.java (93%) rename modules/swagger-annotations/src/main/java/io/swagger/{ => v3}/oas/annotations/tags/Tags.java (96%) diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/ExternalDocumentation.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/ExternalDocumentation.java similarity index 97% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/ExternalDocumentation.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/ExternalDocumentation.java index f55a11dfc8..bf24e5180b 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/ExternalDocumentation.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/ExternalDocumentation.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations; +package io.swagger.v3.oas.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/OpenAPIDefinition.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/OpenAPIDefinition.java similarity index 89% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/OpenAPIDefinition.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/OpenAPIDefinition.java index f4edc17fcb..92007ed3a1 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/OpenAPIDefinition.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/OpenAPIDefinition.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations; +package io.swagger.v3.oas.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; @@ -22,10 +22,10 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import io.swagger.oas.annotations.info.Info; -import io.swagger.oas.annotations.security.SecurityRequirement; -import io.swagger.oas.annotations.servers.Server; -import io.swagger.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.info.Info; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.servers.Server; +import io.swagger.v3.oas.annotations.tags.Tag; @Target({ ElementType.TYPE, ElementType.PACKAGE }) @Retention(RetentionPolicy.RUNTIME) diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/Operation.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/Operation.java similarity index 92% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/Operation.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/Operation.java index 8ec8cdc1a3..c4e063eee3 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/Operation.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/Operation.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package io.swagger.oas.annotations; +package io.swagger.v3.oas.annotations; -import io.swagger.oas.annotations.extensions.Extension; -import io.swagger.oas.annotations.responses.ApiResponse; -import io.swagger.oas.annotations.security.SecurityRequirement; -import io.swagger.oas.annotations.servers.Server; +import io.swagger.v3.oas.annotations.extensions.Extension; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.servers.Server; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/Parameter.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/Parameter.java similarity index 92% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/Parameter.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/Parameter.java index 8473209fd1..44bec8c0ad 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/Parameter.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/Parameter.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations; +package io.swagger.v3.oas.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; @@ -23,13 +23,13 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import io.swagger.oas.annotations.enums.Explode; -import io.swagger.oas.annotations.enums.ParameterIn; -import io.swagger.oas.annotations.enums.ParameterStyle; -import io.swagger.oas.annotations.media.ArraySchema; -import io.swagger.oas.annotations.media.Content; -import io.swagger.oas.annotations.media.ExampleObject; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.enums.Explode; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.enums.ParameterStyle; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import io.swagger.v3.oas.annotations.media.Schema; /** * Describes a single operation parameter diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/Parameters.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/Parameters.java similarity index 96% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/Parameters.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/Parameters.java index da2ce6ccfd..e396b67771 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/Parameters.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/Parameters.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.swagger.oas.annotations; +package io.swagger.v3.oas.annotations; import java.lang.annotation.ElementType; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/callbacks/Callback.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/callbacks/Callback.java similarity index 94% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/callbacks/Callback.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/callbacks/Callback.java index 0bc47c954a..ab2c26c831 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/callbacks/Callback.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/callbacks/Callback.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.callbacks; +package io.swagger.v3.oas.annotations.callbacks; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; @@ -23,7 +23,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import io.swagger.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Operation; /** * This object represents a callback URL that will be invoked. diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/callbacks/Callbacks.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/callbacks/Callbacks.java similarity index 96% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/callbacks/Callbacks.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/callbacks/Callbacks.java index 31b51a4a98..cfd1e2fb4a 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/callbacks/Callbacks.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/callbacks/Callbacks.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.callbacks; +package io.swagger.v3.oas.annotations.callbacks; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/enums/Explode.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/Explode.java similarity index 53% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/enums/Explode.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/Explode.java index f0521ee53c..6cb0605d29 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/enums/Explode.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/Explode.java @@ -1,4 +1,4 @@ -package io.swagger.oas.annotations.enums; +package io.swagger.v3.oas.annotations.enums; public enum Explode { diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/enums/ParameterIn.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/ParameterIn.java similarity index 87% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/enums/ParameterIn.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/ParameterIn.java index 7320f67efb..953196c0b6 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/enums/ParameterIn.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/ParameterIn.java @@ -1,4 +1,4 @@ -package io.swagger.oas.annotations.enums; +package io.swagger.v3.oas.annotations.enums; public enum ParameterIn { DEFAULT(""), diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/enums/ParameterStyle.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/ParameterStyle.java similarity index 90% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/enums/ParameterStyle.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/ParameterStyle.java index 8b7366562a..45e40c837d 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/enums/ParameterStyle.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/ParameterStyle.java @@ -1,4 +1,4 @@ -package io.swagger.oas.annotations.enums; +package io.swagger.v3.oas.annotations.enums; public enum ParameterStyle { DEFAULT(""), diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/enums/SecuritySchemeIn.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/SecuritySchemeIn.java similarity index 87% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/enums/SecuritySchemeIn.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/SecuritySchemeIn.java index 1091b34000..2250e83f97 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/enums/SecuritySchemeIn.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/SecuritySchemeIn.java @@ -1,4 +1,4 @@ -package io.swagger.oas.annotations.enums; +package io.swagger.v3.oas.annotations.enums; public enum SecuritySchemeIn { DEFAULT(""), diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/enums/SecuritySchemeType.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/SecuritySchemeType.java similarity index 88% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/enums/SecuritySchemeType.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/SecuritySchemeType.java index 02092c6898..7aa4408983 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/enums/SecuritySchemeType.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/SecuritySchemeType.java @@ -1,4 +1,4 @@ -package io.swagger.oas.annotations.enums; +package io.swagger.v3.oas.annotations.enums; public enum SecuritySchemeType { DEFAULT(""), diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/extensions/Extension.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/extensions/Extension.java similarity index 94% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/extensions/Extension.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/extensions/Extension.java index 89f0c2de4f..d13bcfa4a1 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/extensions/Extension.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/extensions/Extension.java @@ -1,4 +1,4 @@ -package io.swagger.oas.annotations.extensions; +package io.swagger.v3.oas.annotations.extensions; import java.lang.annotation.ElementType; import java.lang.annotation.Repeatable; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/extensions/ExtensionProperty.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/extensions/ExtensionProperty.java similarity index 92% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/extensions/ExtensionProperty.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/extensions/ExtensionProperty.java index 75dcc54832..9b6e0c3037 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/extensions/ExtensionProperty.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/extensions/ExtensionProperty.java @@ -1,4 +1,4 @@ -package io.swagger.oas.annotations.extensions; +package io.swagger.v3.oas.annotations.extensions; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/extensions/Extensions.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/extensions/Extensions.java similarity index 96% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/extensions/Extensions.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/extensions/Extensions.java index b963947a62..ee051f17b6 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/extensions/Extensions.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/extensions/Extensions.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.extensions; +package io.swagger.v3.oas.annotations.extensions; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/headers/Header.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/headers/Header.java similarity index 95% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/headers/Header.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/headers/Header.java index 3bb77c59d0..43383e4d1c 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/headers/Header.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/headers/Header.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package io.swagger.oas.annotations.headers; +package io.swagger.v3.oas.annotations.headers; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; /** * Describes a single header object diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/info/Contact.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/info/Contact.java similarity index 96% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/info/Contact.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/info/Contact.java index cb90698304..9260584860 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/info/Contact.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/info/Contact.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.info; +package io.swagger.v3.oas.annotations.info; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/info/Info.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/info/Info.java similarity index 97% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/info/Info.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/info/Info.java index 0d52af3bc0..2872197ffd 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/info/Info.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/info/Info.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.info; +package io.swagger.v3.oas.annotations.info; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/info/License.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/info/License.java similarity index 96% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/info/License.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/info/License.java index df03fac66a..c976e6674f 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/info/License.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/info/License.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.info; +package io.swagger.v3.oas.annotations.info; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/links/Link.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/links/Link.java similarity index 96% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/links/Link.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/links/Link.java index a8fbb62ada..695de76d89 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/links/Link.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/links/Link.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.links; +package io.swagger.v3.oas.annotations.links; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; @@ -22,7 +22,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import io.swagger.oas.annotations.servers.Server; +import io.swagger.v3.oas.annotations.servers.Server; /** diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/links/LinkParameter.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/links/LinkParameter.java similarity index 96% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/links/LinkParameter.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/links/LinkParameter.java index f303c629f3..5b038a2c5b 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/links/LinkParameter.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/links/LinkParameter.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.links; +package io.swagger.v3.oas.annotations.links; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/media/ArraySchema.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/ArraySchema.java similarity index 96% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/media/ArraySchema.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/ArraySchema.java index 1c0f2fdf9a..13e8672c98 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/media/ArraySchema.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/ArraySchema.java @@ -1,4 +1,4 @@ -package io.swagger.oas.annotations.media; +package io.swagger.v3.oas.annotations.media; import java.lang.annotation.ElementType; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/media/Content.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/Content.java similarity index 97% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/media/Content.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/Content.java index 5421e152f9..f68a3a32b2 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/media/Content.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/Content.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.media; +package io.swagger.v3.oas.annotations.media; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/media/DiscriminatorMapping.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/DiscriminatorMapping.java similarity index 96% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/media/DiscriminatorMapping.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/DiscriminatorMapping.java index 4535bdc072..f60888c955 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/media/DiscriminatorMapping.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/DiscriminatorMapping.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.media; +package io.swagger.v3.oas.annotations.media; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/media/Encoding.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/Encoding.java similarity index 95% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/media/Encoding.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/Encoding.java index 8bbb9edcf6..b8b6a10f9e 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/media/Encoding.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/Encoding.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package io.swagger.oas.annotations.media; +package io.swagger.v3.oas.annotations.media; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import io.swagger.oas.annotations.headers.Header; +import io.swagger.v3.oas.annotations.headers.Header; /** * diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/media/ExampleObject.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/ExampleObject.java similarity index 97% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/media/ExampleObject.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/ExampleObject.java index a840752368..f5b988a16a 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/media/ExampleObject.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/ExampleObject.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.media; +package io.swagger.v3.oas.annotations.media; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/media/Schema.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/Schema.java similarity index 98% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/media/Schema.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/Schema.java index 79c345983b..2a2ca0d4c0 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/media/Schema.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/media/Schema.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package io.swagger.oas.annotations.media; +package io.swagger.v3.oas.annotations.media; -import io.swagger.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.ExternalDocumentation; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/parameters/RequestBody.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/parameters/RequestBody.java similarity index 93% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/parameters/RequestBody.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/parameters/RequestBody.java index faf04446cb..13ec0ace2a 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/parameters/RequestBody.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/parameters/RequestBody.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.parameters; +package io.swagger.v3.oas.annotations.parameters; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; @@ -22,7 +22,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import io.swagger.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Content; /** * Describes a single request body. diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/responses/ApiResponse.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/responses/ApiResponse.java similarity index 91% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/responses/ApiResponse.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/responses/ApiResponse.java index 8e7e83d3a3..3624e1a8fb 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/responses/ApiResponse.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/responses/ApiResponse.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package io.swagger.oas.annotations.responses; +package io.swagger.v3.oas.annotations.responses; -import io.swagger.oas.annotations.headers.Header; -import io.swagger.oas.annotations.links.Link; -import io.swagger.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.headers.Header; +import io.swagger.v3.oas.annotations.links.Link; +import io.swagger.v3.oas.annotations.media.Content; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/responses/ApiResponses.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/responses/ApiResponses.java similarity index 95% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/responses/ApiResponses.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/responses/ApiResponses.java index 6fd1cc78a3..ec4dff0994 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/responses/ApiResponses.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/responses/ApiResponses.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.responses; +package io.swagger.v3.oas.annotations.responses; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/OAuthFlow.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/OAuthFlow.java similarity index 97% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/OAuthFlow.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/OAuthFlow.java index c668bb3af5..be8de18670 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/OAuthFlow.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/OAuthFlow.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.security; +package io.swagger.v3.oas.annotations.security; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/OAuthFlows.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/OAuthFlows.java similarity index 97% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/OAuthFlows.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/OAuthFlows.java index 09b04ad8f0..062a40c3b5 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/OAuthFlows.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/OAuthFlows.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.security; +package io.swagger.v3.oas.annotations.security; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/OAuthScope.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/OAuthScope.java similarity index 95% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/OAuthScope.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/OAuthScope.java index 157477b24a..14ed9b9138 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/OAuthScope.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/OAuthScope.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.security; +package io.swagger.v3.oas.annotations.security; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/SecurityRequirement.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/SecurityRequirement.java similarity index 96% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/SecurityRequirement.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/SecurityRequirement.java index f1d868233f..fc5a76df4e 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/SecurityRequirement.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/SecurityRequirement.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.security; +package io.swagger.v3.oas.annotations.security; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/SecurityRequirements.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/SecurityRequirements.java similarity index 96% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/SecurityRequirements.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/SecurityRequirements.java index dbd637ff14..093ddaf913 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/SecurityRequirements.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/SecurityRequirements.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.security; +package io.swagger.v3.oas.annotations.security; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/SecurityScheme.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/SecurityScheme.java similarity index 94% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/SecurityScheme.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/SecurityScheme.java index 7adb2ca814..1e8cca6318 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/SecurityScheme.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/SecurityScheme.java @@ -14,10 +14,10 @@ * limitations under the License. */ -package io.swagger.oas.annotations.security; +package io.swagger.v3.oas.annotations.security; -import io.swagger.oas.annotations.enums.SecuritySchemeIn; -import io.swagger.oas.annotations.enums.SecuritySchemeType; +import io.swagger.v3.oas.annotations.enums.SecuritySchemeIn; +import io.swagger.v3.oas.annotations.enums.SecuritySchemeType; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/SecuritySchemes.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/SecuritySchemes.java similarity index 96% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/SecuritySchemes.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/SecuritySchemes.java index 8cc55bb6ea..635495a56a 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/security/SecuritySchemes.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/SecuritySchemes.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.security; +package io.swagger.v3.oas.annotations.security; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/servers/Server.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/servers/Server.java similarity index 97% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/servers/Server.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/servers/Server.java index d2eb857e52..83352e8374 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/servers/Server.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/servers/Server.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.servers; +package io.swagger.v3.oas.annotations.servers; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/servers/ServerVariable.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/servers/ServerVariable.java similarity index 97% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/servers/ServerVariable.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/servers/ServerVariable.java index 55dc3c5f76..b5746bfcbe 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/servers/ServerVariable.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/servers/ServerVariable.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.servers; +package io.swagger.v3.oas.annotations.servers; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/servers/Servers.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/servers/Servers.java similarity index 96% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/servers/Servers.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/servers/Servers.java index acd22334f1..cf43d7396e 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/servers/Servers.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/servers/Servers.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.swagger.oas.annotations.servers; +package io.swagger.v3.oas.annotations.servers; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/tags/Tag.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/tags/Tag.java similarity index 93% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/tags/Tag.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/tags/Tag.java index 0155ab9d47..cfb6c8d79a 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/tags/Tag.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/tags/Tag.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.tags; +package io.swagger.v3.oas.annotations.tags; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; @@ -23,7 +23,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import io.swagger.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.ExternalDocumentation; @Target({ ElementType.TYPE, ElementType.METHOD }) @Retention(RetentionPolicy.RUNTIME) diff --git a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/tags/Tags.java b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/tags/Tags.java similarity index 96% rename from modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/tags/Tags.java rename to modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/tags/Tags.java index db5f677ff5..837c0fe7d7 100644 --- a/modules/swagger-annotations/src/main/java/io/swagger/oas/annotations/tags/Tags.java +++ b/modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/tags/Tags.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.swagger.oas.annotations.tags; +package io.swagger.v3.oas.annotations.tags; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/modules/swagger-core/src/main/java/io/swagger/jackson/ModelResolver.java b/modules/swagger-core/src/main/java/io/swagger/jackson/ModelResolver.java index 2510ee0613..42ff2b40b9 100644 --- a/modules/swagger-core/src/main/java/io/swagger/jackson/ModelResolver.java +++ b/modules/swagger-core/src/main/java/io/swagger/jackson/ModelResolver.java @@ -21,7 +21,7 @@ import com.google.common.collect.Iterables; import io.swagger.converter.ModelConverter; import io.swagger.converter.ModelConverterContext; -import io.swagger.oas.annotations.media.DiscriminatorMapping; +import io.swagger.v3.oas.annotations.media.DiscriminatorMapping; import io.swagger.oas.models.ExternalDocumentation; import io.swagger.oas.models.media.ArraySchema; import io.swagger.oas.models.media.ComposedSchema; @@ -128,13 +128,13 @@ public Schema resolveAnnotatedType(Type type, return resolveAnnotatedType(_mapper.constructType(type), member, elementName, context, null, null); } - private io.swagger.oas.annotations.media.Schema getSchemaAnnotation(Annotation... annotations) { + private io.swagger.v3.oas.annotations.media.Schema getSchemaAnnotation(Annotation... annotations) { if (annotations == null) { return null; } for (Annotation annotation : annotations) { - if (annotation instanceof io.swagger.oas.annotations.media.Schema) { - return (io.swagger.oas.annotations.media.Schema) annotation; + if (annotation instanceof io.swagger.v3.oas.annotations.media.Schema) { + return (io.swagger.v3.oas.annotations.media.Schema) annotation; } } return null; @@ -175,7 +175,7 @@ public Schema resolveProperty(JavaType propType, property = arrayProperty; } } else { - io.swagger.oas.annotations.media.Schema schemaAnnotation = getSchemaAnnotation(annotations); + io.swagger.v3.oas.annotations.media.Schema schemaAnnotation = getSchemaAnnotation(annotations); if (schemaAnnotation != null) { String format = schemaAnnotation.format(); String type = schemaAnnotation.type(); @@ -276,7 +276,7 @@ else if(PrimitiveType.fromType(type) != null) { return PrimitiveType.fromType(type).createProperty(); } - final io.swagger.oas.annotations.media.Schema directSchemaAnnotation = type.getRawClass().getAnnotation(io.swagger.oas.annotations.media.Schema.class); + final io.swagger.v3.oas.annotations.media.Schema directSchemaAnnotation = type.getRawClass().getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class); final BeanDescription beanDesc = _mapper.getSerializationConfig().introspect(type); @@ -296,8 +296,8 @@ else if(PrimitiveType.fromType(type) != null) { return primitive; } } - io.swagger.oas.annotations.media.Schema schemaAnnotationReference = null; - io.swagger.oas.annotations.media.ArraySchema directArraySchemaAnnotation = type.getRawClass().getAnnotation(io.swagger.oas.annotations.media.ArraySchema.class); + io.swagger.v3.oas.annotations.media.Schema schemaAnnotationReference = null; + io.swagger.v3.oas.annotations.media.ArraySchema directArraySchemaAnnotation = type.getRawClass().getAnnotation(io.swagger.v3.oas.annotations.media.ArraySchema.class); if (directArraySchemaAnnotation != null) { schemaAnnotationReference = directArraySchemaAnnotation.schema(); } else { @@ -951,7 +951,7 @@ private void removeParentProperties (Schema child, Schema parent) { } protected List> getComposedSchemaReferencedClasses(Class clazz) { - final io.swagger.oas.annotations.media.Schema schemaAnnotation = clazz.getAnnotation(io.swagger.oas.annotations.media.Schema.class); + final io.swagger.v3.oas.annotations.media.Schema schemaAnnotation = clazz.getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class); if (schemaAnnotation != null) { Class[] allOf = schemaAnnotation.allOf(); Class[] anyOf = schemaAnnotation.anyOf(); @@ -979,7 +979,7 @@ protected String resolveDescription(Annotated ann) { } protected String resolveTitle(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); if (schema != null && StringUtils.isNotBlank(schema.title())) { return schema.title(); } @@ -987,7 +987,7 @@ protected String resolveTitle(Annotated a) { } protected String resolveFormat(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); if (schema != null && StringUtils.isNotBlank(schema.format())) { return schema.format(); } @@ -995,7 +995,7 @@ protected String resolveFormat(Annotated a) { } protected String resolveDefaultValue(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); if (schema != null) { if (!schema.defaultValue().isEmpty()) { return schema.defaultValue(); @@ -1012,7 +1012,7 @@ protected String resolveDefaultValue(Annotated a) { protected Object resolveExample(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); if (schema != null) { if (!schema.example().isEmpty()) { try { @@ -1027,7 +1027,7 @@ protected Object resolveExample(Annotated a) { } protected Boolean resolveReadOnly(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); // TODO possibly set schema.readOnly to be Boolean object if (schema != null && schema.readOnly()) { return schema.readOnly(); @@ -1036,7 +1036,7 @@ protected Boolean resolveReadOnly(Annotated a) { } protected Boolean resolveNullable(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); if (schema != null && schema.nullable()) { return schema.nullable(); } @@ -1044,7 +1044,7 @@ protected Boolean resolveNullable(Annotated a) { } protected BigDecimal resolveMultipleOf(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); if (schema != null && schema.multipleOf() != 0) { return new BigDecimal(schema.multipleOf()); } @@ -1052,7 +1052,7 @@ protected BigDecimal resolveMultipleOf(Annotated a) { } protected Integer resolveMaxLength(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); if (schema != null && schema.maxLength() != Integer.MAX_VALUE && schema.maxLength() > 0) { return schema.maxLength(); } @@ -1060,7 +1060,7 @@ protected Integer resolveMaxLength(Annotated a) { } protected Integer resolveMinLength(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); if (schema != null && schema.minLength() > 0) { return schema.minLength(); } @@ -1068,7 +1068,7 @@ protected Integer resolveMinLength(Annotated a) { } protected BigDecimal resolveMinimum(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); if (schema != null && NumberUtils.isNumber(schema.minimum())) { String filteredMinimum = schema.minimum().replaceAll(Constants.COMMA, StringUtils.EMPTY); return new BigDecimal(filteredMinimum); @@ -1077,7 +1077,7 @@ protected BigDecimal resolveMinimum(Annotated a) { } protected BigDecimal resolveMaximum(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); if (schema != null && NumberUtils.isNumber(schema.maximum())) { String filteredMaximum = schema.maximum().replaceAll(Constants.COMMA, StringUtils.EMPTY); return new BigDecimal(filteredMaximum); @@ -1086,14 +1086,14 @@ protected BigDecimal resolveMaximum(Annotated a) { } protected Boolean resolveExclusiveMinimum(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); if (schema != null && schema.exclusiveMinimum()) { return schema.exclusiveMinimum(); } return null; } protected Boolean resolveExclusiveMaximum(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); if (schema != null && schema.exclusiveMaximum()) { return schema.exclusiveMaximum(); } @@ -1101,7 +1101,7 @@ protected Boolean resolveExclusiveMaximum(Annotated a) { } protected String resolvePattern(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); if (schema != null && StringUtils.isNotBlank(schema.pattern())) { return schema.pattern(); } @@ -1109,7 +1109,7 @@ protected String resolvePattern(Annotated a) { } protected Integer resolveMinProperties(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); if (schema != null && schema.minProperties() > 0) { return schema.minProperties(); } @@ -1117,7 +1117,7 @@ protected Integer resolveMinProperties(Annotated a) { } protected Integer resolveMaxProperties(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); if (schema != null && schema.maxProperties() > 0) { return schema.maxProperties(); } @@ -1125,7 +1125,7 @@ protected Integer resolveMaxProperties(Annotated a) { } protected List resolveRequiredProperties(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); if ( schema != null && schema.requiredProperties() != null && schema.requiredProperties().length > 0 && @@ -1137,7 +1137,7 @@ protected List resolveRequiredProperties(Annotated a) { } protected Boolean resolveWriteOnly(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); if (schema != null && schema.writeOnly()) { return schema.writeOnly(); } @@ -1146,8 +1146,8 @@ protected Boolean resolveWriteOnly(Annotated a) { protected ExternalDocumentation resolveExternalDocumentation(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); - io.swagger.oas.annotations.ExternalDocumentation externalDocumentation = a.getAnnotation(io.swagger.oas.annotations.ExternalDocumentation.class); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.ExternalDocumentation externalDocumentation = a.getAnnotation(io.swagger.v3.oas.annotations.ExternalDocumentation.class); ExternalDocumentation external = resolveExternalDocumentation(externalDocumentation); if (external == null) { @@ -1158,7 +1158,7 @@ protected ExternalDocumentation resolveExternalDocumentation(Annotated a) { return external; } - protected ExternalDocumentation resolveExternalDocumentation(io.swagger.oas.annotations.ExternalDocumentation externalDocumentation) { + protected ExternalDocumentation resolveExternalDocumentation(io.swagger.v3.oas.annotations.ExternalDocumentation externalDocumentation) { if (externalDocumentation == null) { return null; @@ -1180,7 +1180,7 @@ protected ExternalDocumentation resolveExternalDocumentation(io.swagger.oas.anno } protected Boolean resolveDeprecated(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); if (schema != null && schema.deprecated()) { return schema.deprecated(); } @@ -1188,7 +1188,7 @@ protected Boolean resolveDeprecated(Annotated a) { } protected List resolveAllowableValues(Annotated a) { - io.swagger.oas.annotations.media.Schema schema = getSchemaAnnotation(a); + io.swagger.v3.oas.annotations.media.Schema schema = getSchemaAnnotation(a); if ( schema != null && schema.allowableValues() != null && schema.allowableValues().length > 0) { @@ -1199,7 +1199,7 @@ protected List resolveAllowableValues(Annotated a) { protected Discriminator resolveDiscriminator(JavaType type, ModelConverterContext context) { - io.swagger.oas.annotations.media.Schema directSchemaAnnotation = type.getRawClass().getAnnotation(io.swagger.oas.annotations.media.Schema.class); + io.swagger.v3.oas.annotations.media.Schema directSchemaAnnotation = type.getRawClass().getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class); // uses raw class, as it does not consider super class while handling schema annotation for composed model props String disc = (directSchemaAnnotation == null) ? "" : directSchemaAnnotation.discriminatorProperty(); @@ -1360,13 +1360,13 @@ protected Schema resolveAnnotatedType( annotations = annotationList.toArray(new Annotation[annotationList.size()]); - io.swagger.oas.annotations.media.Schema mp = null; + io.swagger.v3.oas.annotations.media.Schema mp = null; - io.swagger.oas.annotations.media.ArraySchema as = member.getAnnotation(io.swagger.oas.annotations.media.ArraySchema.class); + io.swagger.v3.oas.annotations.media.ArraySchema as = member.getAnnotation(io.swagger.v3.oas.annotations.media.ArraySchema.class); if (as != null) { mp = as.schema(); } else { - mp = member.getAnnotation(io.swagger.oas.annotations.media.Schema.class); + mp = member.getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class); } // allow override of name from annotation @@ -1442,15 +1442,15 @@ protected Schema resolveAnnotatedType( return property; } - protected io.swagger.oas.annotations.media.Schema getSchemaAnnotation(Annotated a) { + protected io.swagger.v3.oas.annotations.media.Schema getSchemaAnnotation(Annotated a) { if (a == null) { return null; } - io.swagger.oas.annotations.media.ArraySchema arraySchema = a.getAnnotation(io.swagger.oas.annotations.media.ArraySchema.class); + io.swagger.v3.oas.annotations.media.ArraySchema arraySchema = a.getAnnotation(io.swagger.v3.oas.annotations.media.ArraySchema.class); if (arraySchema != null) { return arraySchema.schema(); } else { - return a.getAnnotation(io.swagger.oas.annotations.media.Schema.class); + return a.getAnnotation(io.swagger.v3.oas.annotations.media.Schema.class); } } diff --git a/modules/swagger-core/src/main/java/io/swagger/jackson/SwaggerAnnotationIntrospector.java b/modules/swagger-core/src/main/java/io/swagger/jackson/SwaggerAnnotationIntrospector.java index 85e17fe5a1..c6e43a22a1 100644 --- a/modules/swagger-core/src/main/java/io/swagger/jackson/SwaggerAnnotationIntrospector.java +++ b/modules/swagger-core/src/main/java/io/swagger/jackson/SwaggerAnnotationIntrospector.java @@ -6,7 +6,7 @@ import com.fasterxml.jackson.databind.introspect.AnnotatedClass; import com.fasterxml.jackson.databind.introspect.AnnotatedMember; import com.fasterxml.jackson.databind.jsontype.NamedType; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import javax.xml.bind.annotation.XmlElement; import java.util.Collections; diff --git a/modules/swagger-core/src/main/java/io/swagger/jackson/TypeNameResolver.java b/modules/swagger-core/src/main/java/io/swagger/jackson/TypeNameResolver.java index e6027a55e2..1895f06a73 100644 --- a/modules/swagger-core/src/main/java/io/swagger/jackson/TypeNameResolver.java +++ b/modules/swagger-core/src/main/java/io/swagger/jackson/TypeNameResolver.java @@ -3,7 +3,7 @@ //import io.swagger.annotations.ApiModel; import com.fasterxml.jackson.databind.JavaType; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.util.PrimitiveType; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.text.WordUtils; diff --git a/modules/swagger-core/src/main/java/io/swagger/util/AnnotationsUtils.java b/modules/swagger-core/src/main/java/io/swagger/util/AnnotationsUtils.java index cf01eb0051..62e2af3936 100644 --- a/modules/swagger-core/src/main/java/io/swagger/util/AnnotationsUtils.java +++ b/modules/swagger-core/src/main/java/io/swagger/util/AnnotationsUtils.java @@ -1,7 +1,7 @@ package io.swagger.util; -import io.swagger.oas.annotations.links.LinkParameter; -import io.swagger.oas.annotations.media.ExampleObject; +import io.swagger.v3.oas.annotations.links.LinkParameter; +import io.swagger.v3.oas.annotations.media.ExampleObject; import io.swagger.oas.models.ExternalDocumentation; import io.swagger.oas.models.examples.Example; import io.swagger.oas.models.headers.Header; @@ -37,7 +37,7 @@ public abstract class AnnotationsUtils { private static Logger LOGGER = LoggerFactory.getLogger(AnnotationsUtils.class); - public static boolean hasSchemaAnnotation(io.swagger.oas.annotations.media.Schema schema) { + public static boolean hasSchemaAnnotation(io.swagger.v3.oas.annotations.media.Schema schema) { if (schema == null) { return false; } @@ -76,7 +76,7 @@ public static boolean hasSchemaAnnotation(io.swagger.oas.annotations.media.Schem return true; } - public static boolean hasArrayAnnotation(io.swagger.oas.annotations.media.ArraySchema array) { + public static boolean hasArrayAnnotation(io.swagger.v3.oas.annotations.media.ArraySchema array) { if (array == null) { return false; } @@ -117,7 +117,7 @@ public static Optional getExample(ExampleObject example) { return Optional.empty(); } - public static Optional getArraySchema(io.swagger.oas.annotations.media.ArraySchema arraySchema) { + public static Optional getArraySchema(io.swagger.v3.oas.annotations.media.ArraySchema arraySchema) { if (arraySchema == null || !hasArrayAnnotation(arraySchema)) { return Optional.empty(); } @@ -146,7 +146,7 @@ public static Optional getArraySchema(io.swagger.oas.annotations.me return Optional.of(arraySchemaObject); } - public static Optional getSchemaFromAnnotation(io.swagger.oas.annotations.media.Schema schema) { + public static Optional getSchemaFromAnnotation(io.swagger.v3.oas.annotations.media.Schema schema) { if (schema == null || !hasSchemaAnnotation(schema)) { return Optional.empty(); } @@ -253,13 +253,13 @@ public static Optional> getTags(String[] tags) { return Optional.of(tagsList); } - public static Optional> getTags(io.swagger.oas.annotations.tags.Tag[] tags) { + public static Optional> getTags(io.swagger.v3.oas.annotations.tags.Tag[] tags) { if (tags == null) { return Optional.empty(); } Set tagsList = new LinkedHashSet<>(); boolean isEmpty = true; - for (io.swagger.oas.annotations.tags.Tag tag : tags) { + for (io.swagger.v3.oas.annotations.tags.Tag tag : tags) { Tag tagObject = new Tag(); if (StringUtils.isNotBlank(tag.name())) { isEmpty = false; @@ -275,12 +275,12 @@ public static Optional> getTags(io.swagger.oas.annotations.tags.Tag[] t return Optional.of(tagsList); } - public static Optional> getServers(io.swagger.oas.annotations.servers.Server[] servers) { + public static Optional> getServers(io.swagger.v3.oas.annotations.servers.Server[] servers) { if (servers == null) { return Optional.empty(); } List serverObjects = new ArrayList<>(); - for (io.swagger.oas.annotations.servers.Server server : servers) { + for (io.swagger.v3.oas.annotations.servers.Server server : servers) { getServer(server).ifPresent(serverObjects::add); } if (serverObjects.size() == 0) { @@ -289,7 +289,7 @@ public static Optional> getServers(io.swagger.oas.annotations.serve return Optional.of(serverObjects); } - public static Optional getServer(io.swagger.oas.annotations.servers.Server server) { + public static Optional getServer(io.swagger.v3.oas.annotations.servers.Server server) { if (server == null) { return Optional.empty(); } @@ -307,9 +307,9 @@ public static Optional getServer(io.swagger.oas.annotations.servers.Serv if (isEmpty) { return Optional.empty(); } - io.swagger.oas.annotations.servers.ServerVariable[] serverVariables = server.variables(); + io.swagger.v3.oas.annotations.servers.ServerVariable[] serverVariables = server.variables(); ServerVariables serverVariablesObject = new ServerVariables(); - for (io.swagger.oas.annotations.servers.ServerVariable serverVariable : serverVariables) { + for (io.swagger.v3.oas.annotations.servers.ServerVariable serverVariable : serverVariables) { ServerVariable serverVariableObject = new ServerVariable(); if (StringUtils.isNotBlank(serverVariable.description())) { serverVariableObject.setDescription(serverVariable.description()); @@ -321,7 +321,7 @@ public static Optional getServer(io.swagger.oas.annotations.servers.Serv return Optional.of(serverObject); } - public static Optional getExternalDocumentation(io.swagger.oas.annotations.ExternalDocumentation externalDocumentation) { + public static Optional getExternalDocumentation(io.swagger.v3.oas.annotations.ExternalDocumentation externalDocumentation) { if (externalDocumentation == null) { return Optional.empty(); } @@ -340,7 +340,7 @@ public static Optional getExternalDocumentation(io.swagge } return Optional.of(external); } - public static Optional getInfo(io.swagger.oas.annotations.info.Info info) { + public static Optional getInfo(io.swagger.v3.oas.annotations.info.Info info) { if (info == null) { return Optional.empty(); } @@ -371,7 +371,7 @@ public static Optional getInfo(io.swagger.oas.annotations.info.Info info) return Optional.of(infoObject); } - public static Optional getContact(io.swagger.oas.annotations.info.Contact contact) { + public static Optional getContact(io.swagger.v3.oas.annotations.info.Contact contact) { if (contact == null) { return Optional.empty(); } @@ -395,7 +395,7 @@ public static Optional getContact(io.swagger.oas.annotations.info.Conta return Optional.of(contactObject); } - public static Optional getLicense(io.swagger.oas.annotations.info.License license) { + public static Optional getLicense(io.swagger.v3.oas.annotations.info.License license) { if (license == null) { return Optional.empty(); } @@ -415,18 +415,18 @@ public static Optional getLicense(io.swagger.oas.annotations.info.Licen return Optional.of(licenseObject); } - public static Map getLinks(io.swagger.oas.annotations.links.Link[] links) { + public static Map getLinks(io.swagger.v3.oas.annotations.links.Link[] links) { Map linkMap = new HashMap<>(); if (links == null) { return linkMap; } - for (io.swagger.oas.annotations.links.Link link : links) { + for (io.swagger.v3.oas.annotations.links.Link link : links) { getLink(link).ifPresent(linkResult -> linkMap.put(link.name(), linkResult)); } return linkMap; } - public static Optional getLink(io.swagger.oas.annotations.links.Link link) { + public static Optional getLink(io.swagger.v3.oas.annotations.links.Link link) { if (link == null) { return Optional.empty(); } @@ -473,13 +473,13 @@ public static Map getLinkParameters(LinkParameter[] return linkParametersMap; } - public static Optional> getHeaders(io.swagger.oas.annotations.headers.Header[] annotationHeaders) { + public static Optional> getHeaders(io.swagger.v3.oas.annotations.headers.Header[] annotationHeaders) { if (annotationHeaders == null) { return Optional.empty(); } Map headers = new HashMap<>(); - for (io.swagger.oas.annotations.headers.Header header : annotationHeaders) { + for (io.swagger.v3.oas.annotations.headers.Header header : annotationHeaders) { getHeader(header).ifPresent(headerResult -> headers.put(header.name(), headerResult)); } @@ -489,7 +489,7 @@ public static Optional> getHeaders(io.swagger.oas.annotation return Optional.of(headers); } - public static Optional
getHeader(io.swagger.oas.annotations.headers.Header header) { + public static Optional
getHeader(io.swagger.v3.oas.annotations.headers.Header header) { if (header == null) { return Optional.empty(); @@ -534,7 +534,7 @@ public static Optional
getHeader(io.swagger.oas.annotations.headers.Head return Optional.of(headerObject); } - public static void addEncodingToMediaType(MediaType mediaType, io.swagger.oas.annotations.media.Encoding encoding) { + public static void addEncodingToMediaType(MediaType mediaType, io.swagger.v3.oas.annotations.media.Encoding encoding) { if (encoding == null) { return; } diff --git a/modules/swagger-core/src/main/java/io/swagger/util/BaseReaderUtils.java b/modules/swagger-core/src/main/java/io/swagger/util/BaseReaderUtils.java index bc548e04a7..a8ea9c6b85 100644 --- a/modules/swagger-core/src/main/java/io/swagger/util/BaseReaderUtils.java +++ b/modules/swagger-core/src/main/java/io/swagger/util/BaseReaderUtils.java @@ -1,7 +1,7 @@ package io.swagger.util; -import io.swagger.oas.annotations.extensions.Extension; -import io.swagger.oas.annotations.extensions.ExtensionProperty; +import io.swagger.v3.oas.annotations.extensions.Extension; +import io.swagger.v3.oas.annotations.extensions.ExtensionProperty; import org.apache.commons.lang3.StringUtils; import java.util.HashMap; diff --git a/modules/swagger-core/src/main/java/io/swagger/util/ParameterProcessor.java b/modules/swagger-core/src/main/java/io/swagger/util/ParameterProcessor.java index 6e45f41063..c27ebb2bf8 100644 --- a/modules/swagger-core/src/main/java/io/swagger/util/ParameterProcessor.java +++ b/modules/swagger-core/src/main/java/io/swagger/util/ParameterProcessor.java @@ -2,8 +2,9 @@ import io.swagger.converter.ModelConverters; import io.swagger.converter.ResolvedSchema; -import io.swagger.oas.annotations.enums.Explode; -import io.swagger.oas.annotations.media.ExampleObject; +import io.swagger.v3.oas.annotations.enums.Explode; +import io.swagger.v3.oas.annotations.media.Encoding; +import io.swagger.v3.oas.annotations.media.ExampleObject; import io.swagger.oas.models.Components; import io.swagger.oas.models.examples.Example; import io.swagger.oas.models.media.ArraySchema; @@ -55,8 +56,8 @@ public static Parameter applyAnnotations(Parameter parameter, Type type, List components.addSchemas(key, schema)); for (Annotation annotation : annotations) { - if (annotation instanceof io.swagger.oas.annotations.Parameter) { - io.swagger.oas.annotations.Parameter p = (io.swagger.oas.annotations.Parameter) annotation; + if (annotation instanceof io.swagger.v3.oas.annotations.Parameter) { + io.swagger.v3.oas.annotations.Parameter p = (io.swagger.v3.oas.annotations.Parameter) annotation; if (p.hidden()) { return null; } @@ -158,7 +159,7 @@ public static Parameter applyAnnotations(Parameter parameter, Type type, List annotations) if (annotations == null) { return null; } - io.swagger.oas.annotations.media.Schema rootSchema = null; - io.swagger.oas.annotations.media.ArraySchema rootArraySchema = null; - io.swagger.oas.annotations.media.Schema contentSchema = null; - io.swagger.oas.annotations.media.Schema paramSchema = null; - io.swagger.oas.annotations.media.ArraySchema paramArraySchema = null; + io.swagger.v3.oas.annotations.media.Schema rootSchema = null; + io.swagger.v3.oas.annotations.media.ArraySchema rootArraySchema = null; + io.swagger.v3.oas.annotations.media.Schema contentSchema = null; + io.swagger.v3.oas.annotations.media.Schema paramSchema = null; + io.swagger.v3.oas.annotations.media.ArraySchema paramArraySchema = null; for (Annotation annotation : annotations) { - if (annotation instanceof io.swagger.oas.annotations.media.Schema) { - rootSchema = (io.swagger.oas.annotations.media.Schema) annotation; + if (annotation instanceof io.swagger.v3.oas.annotations.media.Schema) { + rootSchema = (io.swagger.v3.oas.annotations.media.Schema) annotation; } - else if (annotation instanceof io.swagger.oas.annotations.media.ArraySchema) { - rootArraySchema = (io.swagger.oas.annotations.media.ArraySchema) annotation; + else if (annotation instanceof io.swagger.v3.oas.annotations.media.ArraySchema) { + rootArraySchema = (io.swagger.v3.oas.annotations.media.ArraySchema) annotation; } - else if (annotation instanceof io.swagger.oas.annotations.Parameter) { - io.swagger.oas.annotations.Parameter paramAnnotation = (io.swagger.oas.annotations.Parameter)annotation; + else if (annotation instanceof io.swagger.v3.oas.annotations.Parameter) { + io.swagger.v3.oas.annotations.Parameter paramAnnotation = (io.swagger.v3.oas.annotations.Parameter)annotation; if (paramAnnotation.content().length > 0) { if (AnnotationsUtils.hasSchemaAnnotation(paramAnnotation.content()[0].schema())) { contentSchema = paramAnnotation.content()[0].schema(); @@ -235,13 +236,13 @@ else if (annotation instanceof io.swagger.oas.annotations.Parameter) { return null; } - public static Type getParameterType(io.swagger.oas.annotations.Parameter paramAnnotation) { + public static Type getParameterType(io.swagger.v3.oas.annotations.Parameter paramAnnotation) { if (paramAnnotation == null) { return null; } - io.swagger.oas.annotations.media.Schema contentSchema = null; - io.swagger.oas.annotations.media.Schema paramSchema = null; - io.swagger.oas.annotations.media.ArraySchema paramArraySchema = null; + io.swagger.v3.oas.annotations.media.Schema contentSchema = null; + io.swagger.v3.oas.annotations.media.Schema paramSchema = null; + io.swagger.v3.oas.annotations.media.ArraySchema paramArraySchema = null; if (paramAnnotation.content().length > 0) { if (AnnotationsUtils.hasSchemaAnnotation(paramAnnotation.content()[0].schema())) { @@ -266,7 +267,7 @@ public static Type getParameterType(io.swagger.oas.annotations.Parameter paramAn return String.class; } - public static Type getSchemaType(io.swagger.oas.annotations.media.Schema schema) { + public static Type getSchemaType(io.swagger.v3.oas.annotations.media.Schema schema) { if (schema == null) { return String.class; } @@ -291,7 +292,7 @@ public static Type getSchemaType(io.swagger.oas.annotations.media.Schema schema) } - public static Optional getContent(io.swagger.oas.annotations.media.Content[] annotationContents, String[] classTypes, String[] methodTypes, Schema schema) { + public static Optional getContent(io.swagger.v3.oas.annotations.media.Content[] annotationContents, String[] classTypes, String[] methodTypes, Schema schema) { if (annotationContents == null || annotationContents.length == 0) { return Optional.empty(); } @@ -299,7 +300,7 @@ public static Optional getContent(io.swagger.oas.annotations.media.Cont //Encapsulating Content model Content content = new Content(); - io.swagger.oas.annotations.media.Content annotationContent = annotationContents[0]; + io.swagger.v3.oas.annotations.media.Content annotationContent = annotationContents[0]; MediaType mediaType = new MediaType(); mediaType.setSchema(schema); @@ -307,8 +308,8 @@ public static Optional getContent(io.swagger.oas.annotations.media.Cont for (ExampleObject example : examples) { AnnotationsUtils.getExample(example).ifPresent(exampleObject -> mediaType.addExamples(example.name(), exampleObject)); } - io.swagger.oas.annotations.media.Encoding[] encodings = annotationContent.encoding(); - for (io.swagger.oas.annotations.media.Encoding encoding : encodings) { + Encoding[] encodings = annotationContent.encoding(); + for (Encoding encoding : encodings) { AnnotationsUtils.addEncodingToMediaType(mediaType, encoding); } if (StringUtils.isNotBlank(annotationContent.mediaType())) { diff --git a/modules/swagger-core/src/test/java/io/swagger/converting/ModelConverterTest.java b/modules/swagger-core/src/test/java/io/swagger/converting/ModelConverterTest.java index fe3c3f0099..b8499cab07 100644 --- a/modules/swagger-core/src/test/java/io/swagger/converting/ModelConverterTest.java +++ b/modules/swagger-core/src/test/java/io/swagger/converting/ModelConverterTest.java @@ -368,15 +368,15 @@ public void formatDate() { } class DateModel { - @io.swagger.oas.annotations.media.Schema + @io.swagger.v3.oas.annotations.media.Schema public Date date; - @io.swagger.oas.annotations.media.Schema + @io.swagger.v3.oas.annotations.media.Schema public int intValue; - @io.swagger.oas.annotations.media.Schema + @io.swagger.v3.oas.annotations.media.Schema public Long longValue; - @io.swagger.oas.annotations.media.Schema + @io.swagger.v3.oas.annotations.media.Schema public Float floatValue; - @io.swagger.oas.annotations.media.Schema + @io.swagger.v3.oas.annotations.media.Schema public Double doubleValue; } } diff --git a/modules/swagger-core/src/test/java/io/swagger/converting/NumericFormatTest.java b/modules/swagger-core/src/test/java/io/swagger/converting/NumericFormatTest.java index ca56334ec7..a0e74fd37b 100644 --- a/modules/swagger-core/src/test/java/io/swagger/converting/NumericFormatTest.java +++ b/modules/swagger-core/src/test/java/io/swagger/converting/NumericFormatTest.java @@ -82,19 +82,19 @@ public void testFormatOfBigDecimal() { } static class ModelWithIntegerFields { - @io.swagger.oas.annotations.media.Schema + @io.swagger.v3.oas.annotations.media.Schema @Min(value = 3) public Integer id; } static class ModelWithDecimalFields { - @io.swagger.oas.annotations.media.Schema + @io.swagger.v3.oas.annotations.media.Schema @DecimalMin(value = "3.3") public Double id; } static class ModelWithoutScientificFields { - @io.swagger.oas.annotations.media.Schema + @io.swagger.v3.oas.annotations.media.Schema @DecimalMin(value = "-9999999999999999.99") @DecimalMax(value = "9999999999999999.99") public BigDecimal id; diff --git a/modules/swagger-core/src/test/java/io/swagger/converting/PojoTest.java b/modules/swagger-core/src/test/java/io/swagger/converting/PojoTest.java index 0b62b8e288..164a431860 100644 --- a/modules/swagger-core/src/test/java/io/swagger/converting/PojoTest.java +++ b/modules/swagger-core/src/test/java/io/swagger/converting/PojoTest.java @@ -2,7 +2,7 @@ import io.swagger.converter.ModelConverters; import io.swagger.matchers.SerializationMatchers; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.util.ResourceUtils; import org.testng.annotations.Test; diff --git a/modules/swagger-core/src/test/java/io/swagger/converting/override/ModelPropertyOverrideTest.java b/modules/swagger-core/src/test/java/io/swagger/converting/override/ModelPropertyOverrideTest.java index 4a7090b685..0c77336223 100644 --- a/modules/swagger-core/src/test/java/io/swagger/converting/override/ModelPropertyOverrideTest.java +++ b/modules/swagger-core/src/test/java/io/swagger/converting/override/ModelPropertyOverrideTest.java @@ -39,7 +39,7 @@ public String getId() { public void setId(String id) { } - @io.swagger.oas.annotations.media.Schema(required= false, description = "instead of modeling this class in the documentation, we will model a string") + @io.swagger.v3.oas.annotations.media.Schema(required= false, description = "instead of modeling this class in the documentation, we will model a string") public MyCustomClass getMyCustomClass() { return null; } diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/ApiFirstRequiredFieldModel.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/ApiFirstRequiredFieldModel.java index 00524e4c7e..664fa80cd4 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/ApiFirstRequiredFieldModel.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/ApiFirstRequiredFieldModel.java @@ -1,7 +1,7 @@ package io.swagger.oas.models; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/Car.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/Car.java index f0ed329344..12cd06c759 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/Car.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/Car.java @@ -1,6 +1,6 @@ package io.swagger.oas.models; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; public class Car { @Schema(readOnly = true) diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/Cat.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/Cat.java index 09d172e6d2..64f0a2a1f0 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/Cat.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/Cat.java @@ -1,6 +1,6 @@ package io.swagger.oas.models; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.oas.models.composition.Pet; @Schema//(parent = Pet.class) diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/ClientOptInput.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/ClientOptInput.java index 1e0b0433c7..7d10e9db97 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/ClientOptInput.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/ClientOptInput.java @@ -1,7 +1,7 @@ package io.swagger.oas.models; import com.fasterxml.jackson.databind.JsonNode; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; public class ClientOptInput { private String opts; diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/Department.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/Department.java index 0dfe5f6d15..6e08ebe516 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/Department.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/Department.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo.As; import com.fasterxml.jackson.annotation.JsonTypeInfo.Id; import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/Employee.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/Employee.java index 64d4c69191..9f7dd692ca 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/Employee.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/Employee.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo.As; import com.fasterxml.jackson.annotation.JsonTypeInfo.Id; import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/Issue534.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/Issue534.java index 75652bf486..a29866b596 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/Issue534.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/Issue534.java @@ -1,6 +1,6 @@ package io.swagger.oas.models; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/JCovariantGetter.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/JCovariantGetter.java index 202c4a229f..2dd725529e 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/JCovariantGetter.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/JCovariantGetter.java @@ -1,6 +1,6 @@ package io.swagger.oas.models; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; public abstract class JCovariantGetter { @Schema diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/Link.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/Link.java index d3c55992ac..93209c5755 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/Link.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/Link.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo.As; import com.fasterxml.jackson.annotation.JsonTypeInfo.Id; import com.fasterxml.jackson.annotation.JsonTypeName; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/Model1979.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/Model1979.java index 758b009d68..ec95731816 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/Model1979.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/Model1979.java @@ -1,6 +1,6 @@ package io.swagger.oas.models; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; public class Model1979 { @Schema(nullable = true) diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithAltPropertyName.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithAltPropertyName.java index c615c7b4b7..40668a9be5 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithAltPropertyName.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithAltPropertyName.java @@ -1,6 +1,6 @@ package io.swagger.oas.models; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; @Schema(title = "sample_model") public class ModelWithAltPropertyName { diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithApiModel.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithApiModel.java index 28d948126d..d4bfb47312 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithApiModel.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithApiModel.java @@ -1,6 +1,6 @@ package io.swagger.oas.models; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; @Schema(title = "MyModel") public class ModelWithApiModel { diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithBooleanProperty.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithBooleanProperty.java index 9647473f51..3f95ad7812 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithBooleanProperty.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithBooleanProperty.java @@ -1,6 +1,6 @@ package io.swagger.oas.models; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; public class ModelWithBooleanProperty { @Schema(allowableValues = "true") diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithModelPropertyOverrides.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithModelPropertyOverrides.java index b778abe3df..af81dcada4 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithModelPropertyOverrides.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithModelPropertyOverrides.java @@ -1,7 +1,7 @@ package io.swagger.oas.models; -import io.swagger.oas.annotations.media.ArraySchema; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Schema; public class ModelWithModelPropertyOverrides { @ArraySchema(schema = @Schema(implementation = Children.class)) diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithOffset.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithOffset.java index 2e5df646a8..5012b0bf2f 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithOffset.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithOffset.java @@ -1,6 +1,6 @@ package io.swagger.oas.models; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; public class ModelWithOffset { public String id; diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithRanges.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithRanges.java index 7a5fd83db2..2bbe4f4e21 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithRanges.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithRanges.java @@ -1,6 +1,6 @@ package io.swagger.oas.models; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; public class ModelWithRanges { @Schema(description = "values with include range", minimum = "1", maximum = "5") diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithTuple2.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithTuple2.java index 8485c79211..65f91a4ece 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithTuple2.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/ModelWithTuple2.java @@ -16,13 +16,13 @@ import java.util.Set; public class ModelWithTuple2 { - @io.swagger.oas.annotations.media.Schema(description = "Possible values for state property of timesheet or timesheet entry", required = true) + @io.swagger.v3.oas.annotations.media.Schema(description = "Possible values for state property of timesheet or timesheet entry", required = true) public Pair timesheetStates; - @io.swagger.oas.annotations.media.Schema(description = "set of pairs", required = true) + @io.swagger.v3.oas.annotations.media.Schema(description = "set of pairs", required = true) public Set> manyPairs; - @io.swagger.oas.annotations.media.Schema(description = "set of pairs with complex left", required = true) + @io.swagger.v3.oas.annotations.media.Schema(description = "set of pairs with complex left", required = true) public Set> complexLeft; static class ComplexLeft { diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/ReadOnlyFields.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/ReadOnlyFields.java index 1d7540177a..8cb826e460 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/ReadOnlyFields.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/ReadOnlyFields.java @@ -1,6 +1,6 @@ package io.swagger.oas.models; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; public class ReadOnlyFields { @Schema(readOnly = true) diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/ReadOnlyModel.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/ReadOnlyModel.java index 5ba081cad2..bf07c7df9f 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/ReadOnlyModel.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/ReadOnlyModel.java @@ -1,6 +1,6 @@ package io.swagger.oas.models; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; public class ReadOnlyModel { private Integer id; diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/XmlFirstRequiredFieldModel.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/XmlFirstRequiredFieldModel.java index d00541cb82..63587aacbd 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/XmlFirstRequiredFieldModel.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/XmlFirstRequiredFieldModel.java @@ -1,6 +1,6 @@ package io.swagger.oas.models; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/AbstractBaseModelWithSubTypes.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/AbstractBaseModelWithSubTypes.java index 52425316af..68177c98f6 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/AbstractBaseModelWithSubTypes.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/AbstractBaseModelWithSubTypes.java @@ -1,7 +1,7 @@ package io.swagger.oas.models.composition; import com.fasterxml.jackson.annotation.JsonSubTypes; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; @JsonSubTypes({@JsonSubTypes.Type(value = Thing1.class, name = "thing3"), @JsonSubTypes.Type(value = Thing2.class, name = "thing2")}) @Schema(description = "I am an Abstract Base Model with Sub-Types", discriminatorProperty = "_type") diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/AbstractBaseModelWithoutFields.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/AbstractBaseModelWithoutFields.java index 7995cb036e..b7c1d508fb 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/AbstractBaseModelWithoutFields.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/AbstractBaseModelWithoutFields.java @@ -1,7 +1,7 @@ package io.swagger.oas.models.composition; import com.fasterxml.jackson.annotation.JsonSubTypes; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; @JsonSubTypes({@JsonSubTypes.Type(value = Thing3.class, name = "thing3")}) @Schema(description = "I am an Abstract Base Model without any declared fields and with Sub-Types") diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/AbstractModelWithApiModel.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/AbstractModelWithApiModel.java index c062916aaf..86c240fcb8 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/AbstractModelWithApiModel.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/AbstractModelWithApiModel.java @@ -1,7 +1,7 @@ package io.swagger.oas.models.composition; import com.fasterxml.jackson.annotation.JsonSubTypes; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; @Schema(title = "MyProperty") @JsonSubTypes({@JsonSubTypes.Type(value = ModelWithUrlProperty.class), @JsonSubTypes.Type(value = ModelWithValueProperty.class)}) diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/ModelWithFieldWithSubTypes.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/ModelWithFieldWithSubTypes.java index df8d4edd72..e673e87a99 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/ModelWithFieldWithSubTypes.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/ModelWithFieldWithSubTypes.java @@ -1,6 +1,6 @@ package io.swagger.oas.models.composition; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; @Schema(description = "Class that has a field that is the AbstractBaseModelWithSubTypes") public class ModelWithFieldWithSubTypes { diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/Pet.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/Pet.java index 22387cf190..56e3ef5bc0 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/Pet.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/Pet.java @@ -1,6 +1,6 @@ package io.swagger.oas.models.composition; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; public interface Pet extends Animal { @Schema(required = true, description = "The pet type") diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/PetClass.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/PetClass.java index fe4263f271..00906cead0 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/PetClass.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/PetClass.java @@ -1,6 +1,6 @@ package io.swagger.oas.models.composition; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; public class PetClass extends AnimalClass { private String name; diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/Thing1.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/Thing1.java index 545b5e7c4a..61d1c05dbf 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/Thing1.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/Thing1.java @@ -1,6 +1,6 @@ package io.swagger.oas.models.composition; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; @Schema(description = "Shake hands with Thing1", allOf = {AbstractBaseModelWithSubTypes.class}) public class Thing1 extends AbstractBaseModelWithSubTypes { diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/Thing2.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/Thing2.java index 0b7536926a..c8f0fdb262 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/Thing2.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/Thing2.java @@ -1,6 +1,6 @@ package io.swagger.oas.models.composition; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; @Schema(description = "and Thing2", allOf = {AbstractBaseModelWithSubTypes.class}) public class Thing2 extends AbstractBaseModelWithSubTypes { diff --git a/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/Thing3.java b/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/Thing3.java index 25eea50d6e..e35aa46f19 100644 --- a/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/Thing3.java +++ b/modules/swagger-core/src/test/java/io/swagger/oas/models/composition/Thing3.java @@ -1,6 +1,6 @@ package io.swagger.oas.models.composition; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; @Schema(description = "Thing3", allOf = {AbstractBaseModelWithoutFields.class}) public class Thing3 extends AbstractBaseModelWithoutFields { diff --git a/modules/swagger-core/src/test/java/io/swagger/resolving/BaseReaderUtilsTest.java b/modules/swagger-core/src/test/java/io/swagger/resolving/BaseReaderUtilsTest.java index 665453eeb8..5ee7bc466a 100644 --- a/modules/swagger-core/src/test/java/io/swagger/resolving/BaseReaderUtilsTest.java +++ b/modules/swagger-core/src/test/java/io/swagger/resolving/BaseReaderUtilsTest.java @@ -1,8 +1,8 @@ package io.swagger.resolving; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.extensions.Extension; -import io.swagger.oas.annotations.extensions.ExtensionProperty; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.extensions.Extension; +import io.swagger.v3.oas.annotations.extensions.ExtensionProperty; import io.swagger.util.BaseReaderUtils; import com.google.common.collect.ImmutableMap; diff --git a/modules/swagger-core/src/test/java/io/swagger/resolving/HiddenFieldTest.java b/modules/swagger-core/src/test/java/io/swagger/resolving/HiddenFieldTest.java index 7c170e7eb0..a29408b801 100644 --- a/modules/swagger-core/src/test/java/io/swagger/resolving/HiddenFieldTest.java +++ b/modules/swagger-core/src/test/java/io/swagger/resolving/HiddenFieldTest.java @@ -32,13 +32,13 @@ public void testHiddenField() { } class ModelWithHiddenFields { - @io.swagger.oas.annotations.media.Schema(required = true) + @io.swagger.v3.oas.annotations.media.Schema(required = true) public Long id = null; - @io.swagger.oas.annotations.media.Schema(required = true, hidden = false) + @io.swagger.v3.oas.annotations.media.Schema(required = true, hidden = false) public String name = null; - @io.swagger.oas.annotations.media.Schema(hidden = true) + @io.swagger.v3.oas.annotations.media.Schema(hidden = true) public String password = null; } } diff --git a/modules/swagger-core/src/test/java/io/swagger/resolving/InheritedBeanTest.java b/modules/swagger-core/src/test/java/io/swagger/resolving/InheritedBeanTest.java index 81366277f4..706e253e6d 100644 --- a/modules/swagger-core/src/test/java/io/swagger/resolving/InheritedBeanTest.java +++ b/modules/swagger-core/src/test/java/io/swagger/resolving/InheritedBeanTest.java @@ -5,7 +5,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import io.swagger.converter.ModelConverterContextImpl; import io.swagger.jackson.ModelResolver; -import io.swagger.oas.annotations.media.DiscriminatorMapping; +import io.swagger.v3.oas.annotations.media.DiscriminatorMapping; import io.swagger.oas.models.media.ComposedSchema; import io.swagger.oas.models.media.Schema; import org.testng.annotations.BeforeTest; @@ -196,7 +196,7 @@ private void assertUserObjectPropertiesValid(Map subProperties) @JsonTypeInfo(include = JsonTypeInfo.As.PROPERTY, use = JsonTypeInfo.Id.NAME, property = "type", visible = true) @JsonSubTypes({@JsonSubTypes.Type(value = Sub1Bean.class, name = "sub1")}) - @io.swagger.oas.annotations.media.Schema(description = "BaseBean" + @io.swagger.v3.oas.annotations.media.Schema(description = "BaseBean" , discriminatorProperty = "type", discriminatorMapping = {@DiscriminatorMapping(value = "Sub1BeanMapped", schema = Sub1Bean.class)} ) static class BaseBean { @@ -205,14 +205,14 @@ static class BaseBean { public String b; } - @io.swagger.oas.annotations.media.Schema(description = "Sub1Bean", allOf = {BaseBean.class}) + @io.swagger.v3.oas.annotations.media.Schema(description = "Sub1Bean", allOf = {BaseBean.class}) static class Sub1Bean extends BaseBean { public int c; } @JsonTypeInfo(include = JsonTypeInfo.As.PROPERTY, use = JsonTypeInfo.Id.NAME, property = "type", visible = true) @JsonSubTypes({@JsonSubTypes.Type(value = Sub2Bean.class, name = "sub2")}) - @io.swagger.oas.annotations.media.Schema(description = "BaseBean2" + @io.swagger.v3.oas.annotations.media.Schema(description = "BaseBean2" // , discriminator = "type", subTypes = {Sub1Bean.class} ) static class BaseBean2 { @@ -231,14 +231,14 @@ public void setD(int d) { private int d; } - @io.swagger.oas.annotations.media.Schema(description = "Sub2Bean", allOf = {BaseBean2.class}, anyOf = {BaseBean.class}) + @io.swagger.v3.oas.annotations.media.Schema(description = "Sub2Bean", allOf = {BaseBean2.class}, anyOf = {BaseBean.class}) static class Sub2Bean extends BaseBean2 { public int a; public int c; } @JsonSubTypes({@JsonSubTypes.Type(value = ChildBean3.class, name = "childBean3")}) - @io.swagger.oas.annotations.media.Schema(description = "BaseBean3" + @io.swagger.v3.oas.annotations.media.Schema(description = "BaseBean3" , discriminatorProperty = "type", discriminatorMapping = {@DiscriminatorMapping(value = "ChildBean3Mapped", schema = ChildBean3.class)} ) static class BaseBean3 { @@ -248,18 +248,18 @@ static class BaseBean3 { } @JsonSubTypes({@JsonSubTypes.Type(value = GrandChildBean3.class, name = "grandChildBean3")}) - @io.swagger.oas.annotations.media.Schema(description = "ChildBean3", allOf = {BaseBean3.class}) + @io.swagger.v3.oas.annotations.media.Schema(description = "ChildBean3", allOf = {BaseBean3.class}) static class ChildBean3 extends BaseBean3 { public int c; } - @io.swagger.oas.annotations.media.Schema(description = "GrandChildBean3", allOf = {ChildBean3.class}) + @io.swagger.v3.oas.annotations.media.Schema(description = "GrandChildBean3", allOf = {ChildBean3.class}) static class GrandChildBean3 extends ChildBean3 { public int d; } - @io.swagger.oas.annotations.media.Schema(anyOf = {UserObject.class, EmployeeObject.class}) + @io.swagger.v3.oas.annotations.media.Schema(anyOf = {UserObject.class, EmployeeObject.class}) static class UberObject implements UserObject, EmployeeObject { private String id; private String name; @@ -279,16 +279,16 @@ public String getName() { } } - @io.swagger.oas.annotations.media.Schema(description = "A User Object") + @io.swagger.v3.oas.annotations.media.Schema(description = "A User Object") interface UserObject { - @io.swagger.oas.annotations.media.Schema(format = "uuid", required = true) + @io.swagger.v3.oas.annotations.media.Schema(format = "uuid", required = true) String getId(); String getName(); } - @io.swagger.oas.annotations.media.Schema(description = "An Employee Object", requiredProperties = {"department"}) + @io.swagger.v3.oas.annotations.media.Schema(description = "An Employee Object", requiredProperties = {"department"}) interface EmployeeObject { - @io.swagger.oas.annotations.media.Schema(format = "email") + @io.swagger.v3.oas.annotations.media.Schema(format = "email") String getId(); String getDepartment(); } @@ -368,7 +368,7 @@ private void assertSub2PropertiesValid(Map subProperties) { @JsonSubTypes.Type(value = MultipleSub1Bean.class, name = "multipleSub1"), @JsonSubTypes.Type(value = MultipleSub2Bean.class, name = "multipleSub2") }) - @io.swagger.oas.annotations.media.Schema(description = "MultipleBaseBean" + @io.swagger.v3.oas.annotations.media.Schema(description = "MultipleBaseBean" // , discriminator = "type", subTypes = {MultipleSub1Bean.class, MultipleSub2Bean.class} ) static class MultipleBaseBean { @@ -377,12 +377,12 @@ static class MultipleBaseBean { public String b; } - @io.swagger.oas.annotations.media.Schema(description = "MultipleSub1Bean", allOf = {MultipleBaseBean.class}) + @io.swagger.v3.oas.annotations.media.Schema(description = "MultipleSub1Bean", allOf = {MultipleBaseBean.class}) static class MultipleSub1Bean extends MultipleBaseBean { public int c; } - @io.swagger.oas.annotations.media.Schema(description = "MultipleSub2Bean", allOf = {MultipleBaseBean.class}) + @io.swagger.v3.oas.annotations.media.Schema(description = "MultipleSub2Bean", allOf = {MultipleBaseBean.class}) static class MultipleSub2Bean extends MultipleBaseBean { public int d; } diff --git a/modules/swagger-core/src/test/java/io/swagger/resolving/JodaDateTimeConverterTest.java b/modules/swagger-core/src/test/java/io/swagger/resolving/JodaDateTimeConverterTest.java index 612650c58a..6ce768bcee 100644 --- a/modules/swagger-core/src/test/java/io/swagger/resolving/JodaDateTimeConverterTest.java +++ b/modules/swagger-core/src/test/java/io/swagger/resolving/JodaDateTimeConverterTest.java @@ -33,10 +33,10 @@ public void testJodaDateTime() { class ModelWithJodaDateTime{ - @io.swagger.oas.annotations.media.Schema(description = "name of the model") + @io.swagger.v3.oas.annotations.media.Schema(description = "name of the model") public String name; - @io.swagger.oas.annotations.media.Schema(description = "creation timestamp", required = true) + @io.swagger.v3.oas.annotations.media.Schema(description = "creation timestamp", required = true) public DateTime createdAt; } diff --git a/modules/swagger-core/src/test/java/io/swagger/resolving/JodaLocalDateConverterTest.java b/modules/swagger-core/src/test/java/io/swagger/resolving/JodaLocalDateConverterTest.java index 54bd29483f..f408843860 100644 --- a/modules/swagger-core/src/test/java/io/swagger/resolving/JodaLocalDateConverterTest.java +++ b/modules/swagger-core/src/test/java/io/swagger/resolving/JodaLocalDateConverterTest.java @@ -32,10 +32,10 @@ public void testJodaLocalDate() { } class ModelWithJodaLocalDate { - @io.swagger.oas.annotations.media.Schema(description = "name of the model") + @io.swagger.v3.oas.annotations.media.Schema(description = "name of the model") public String name; - @io.swagger.oas.annotations.media.Schema(description = "creation localDate", required = true) + @io.swagger.v3.oas.annotations.media.Schema(description = "creation localDate", required = true) public LocalDate createdAt; } } diff --git a/modules/swagger-core/src/test/java/io/swagger/resolving/JodaTest.java b/modules/swagger-core/src/test/java/io/swagger/resolving/JodaTest.java index ebb03ca4ae..24871b2566 100644 --- a/modules/swagger-core/src/test/java/io/swagger/resolving/JodaTest.java +++ b/modules/swagger-core/src/test/java/io/swagger/resolving/JodaTest.java @@ -39,10 +39,10 @@ public void testSimple() throws Exception { } static class ModelWithJodaDateTime { - @io.swagger.oas.annotations.media.Schema(description = "Name!") + @io.swagger.v3.oas.annotations.media.Schema(description = "Name!") public String name; - @io.swagger.oas.annotations.media.Schema(description = "creation timestamp", required = true) + @io.swagger.v3.oas.annotations.media.Schema(description = "creation timestamp", required = true) public DateTime createdAt; } } diff --git a/modules/swagger-core/src/test/java/io/swagger/resolving/SimpleGenerationTest.java b/modules/swagger-core/src/test/java/io/swagger/resolving/SimpleGenerationTest.java index c24c136622..e802782641 100644 --- a/modules/swagger-core/src/test/java/io/swagger/resolving/SimpleGenerationTest.java +++ b/modules/swagger-core/src/test/java/io/swagger/resolving/SimpleGenerationTest.java @@ -117,7 +117,7 @@ public void testComplex() throws Exception { */ @JsonPropertyOrder({"a", "b"}) - @io.swagger.oas.annotations.media.Schema(description = "DESC") + @io.swagger.v3.oas.annotations.media.Schema(description = "DESC") static class SimpleBean { public int b; public long c; diff --git a/modules/swagger-core/src/test/java/io/swagger/resolving/XMLGregorianCalendarTest.java b/modules/swagger-core/src/test/java/io/swagger/resolving/XMLGregorianCalendarTest.java index afa14d2e21..95f51699f2 100644 --- a/modules/swagger-core/src/test/java/io/swagger/resolving/XMLGregorianCalendarTest.java +++ b/modules/swagger-core/src/test/java/io/swagger/resolving/XMLGregorianCalendarTest.java @@ -33,10 +33,10 @@ public void testXMLGregorianCalendar() { } class ModelWithCalendar { - @io.swagger.oas.annotations.media.Schema(description = "name of the model") + @io.swagger.v3.oas.annotations.media.Schema(description = "name of the model") public String name; - @io.swagger.oas.annotations.media.Schema(description = "creation timestamp", required = true) + @io.swagger.v3.oas.annotations.media.Schema(description = "creation timestamp", required = true) public XMLGregorianCalendar createdAt; } } diff --git a/modules/swagger-core/src/test/java/io/swagger/resolving/XMLInfoTest.java b/modules/swagger-core/src/test/java/io/swagger/resolving/XMLInfoTest.java index 4b5fbcbaa3..a68845a019 100644 --- a/modules/swagger-core/src/test/java/io/swagger/resolving/XMLInfoTest.java +++ b/modules/swagger-core/src/test/java/io/swagger/resolving/XMLInfoTest.java @@ -6,7 +6,6 @@ import io.swagger.oas.models.media.ArraySchema; import io.swagger.oas.models.media.Schema; import io.swagger.oas.models.media.XML; -import io.swagger.resolving.SwaggerTestBase; import org.testng.annotations.Test; import javax.xml.bind.annotation.XmlAccessType; @@ -48,7 +47,7 @@ public void testSimple() throws Exception { } @XmlRootElement(name = "xmlDecoratedBean") - @io.swagger.oas.annotations.media.Schema(description = "DESC") + @io.swagger.v3.oas.annotations.media.Schema(description = "DESC") static class XmlDecoratedBean { @XmlElement(name = "elementB") @@ -95,7 +94,7 @@ public void testReadingXmlAccessorTypePublic() throws Exception { @XmlRootElement(name = "xmlDecoratedBean") @XmlAccessorType(XmlAccessType.NONE) - @io.swagger.oas.annotations.media.Schema + @io.swagger.v3.oas.annotations.media.Schema static class XmlDecoratedBeanXmlAccessorNone { @XmlElement @@ -105,7 +104,7 @@ static class XmlDecoratedBeanXmlAccessorNone { } @XmlRootElement(name = "xmlDecoratedBean") - @io.swagger.oas.annotations.media.Schema + @io.swagger.v3.oas.annotations.media.Schema static class XmlDecoratedBeanXmlAccessorPublic { @XmlElement diff --git a/modules/swagger-core/src/test/java/io/swagger/util/reflection/ReflectionUtilsTest.java b/modules/swagger-core/src/test/java/io/swagger/util/reflection/ReflectionUtilsTest.java index ad0f7cf8d6..45234f04b6 100644 --- a/modules/swagger-core/src/test/java/io/swagger/util/reflection/ReflectionUtilsTest.java +++ b/modules/swagger-core/src/test/java/io/swagger/util/reflection/ReflectionUtilsTest.java @@ -1,6 +1,7 @@ package io.swagger.util.reflection; -import io.swagger.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.util.reflection.resources.Child; import io.swagger.util.reflection.resources.IParent; import io.swagger.util.reflection.resources.Parent; @@ -108,7 +109,7 @@ public void isConstructorCompatibleTest() throws NoSuchMethodException { @Test public void getAnnotationTest() throws NoSuchMethodException { final Method method = Child.class.getMethod("annotationHolder"); - Assert.assertNotNull(ReflectionUtils.getAnnotation(method, io.swagger.oas.annotations.media.Schema.class)); + Assert.assertNotNull(ReflectionUtils.getAnnotation(method, Schema.class)); Assert.assertNull(ReflectionUtils.getAnnotation(method, ApiResponse.class)); } diff --git a/modules/swagger-core/src/test/java/io/swagger/util/reflection/resources/Parent.java b/modules/swagger-core/src/test/java/io/swagger/util/reflection/resources/Parent.java index 5420fccb86..565c4e27cd 100644 --- a/modules/swagger-core/src/test/java/io/swagger/util/reflection/resources/Parent.java +++ b/modules/swagger-core/src/test/java/io/swagger/util/reflection/resources/Parent.java @@ -1,6 +1,6 @@ package io.swagger.util.reflection.resources; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; @IndirectAnnotation public class Parent { diff --git a/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/DefaultParameterExtension.java b/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/DefaultParameterExtension.java index 3c656e8ba7..b323270035 100644 --- a/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/DefaultParameterExtension.java +++ b/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/DefaultParameterExtension.java @@ -83,8 +83,8 @@ public ResolvedParameter extractParameters(List annotations, pp.setIn(FORM_PARAM); pp.setName(param.value()); parameter = pp; - } else if (annotation instanceof io.swagger.oas.annotations.Parameter) { - if (((io.swagger.oas.annotations.Parameter)annotation).hidden()) { + } else if (annotation instanceof io.swagger.v3.oas.annotations.Parameter) { + if (((io.swagger.v3.oas.annotations.Parameter)annotation).hidden()) { extractParametersResult.parameters = parameters; return extractParametersResult; } diff --git a/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/OperationParser.java b/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/OperationParser.java index 6171df76d5..dcbaa3bc4b 100644 --- a/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/OperationParser.java +++ b/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/OperationParser.java @@ -1,7 +1,8 @@ package io.swagger.jaxrs2; import io.swagger.converter.ModelConverters; -import io.swagger.oas.annotations.media.ExampleObject; +import io.swagger.v3.oas.annotations.media.Encoding; +import io.swagger.v3.oas.annotations.media.ExampleObject; import io.swagger.oas.models.Components; import io.swagger.oas.models.links.Link; import io.swagger.oas.models.media.Content; @@ -24,7 +25,7 @@ public class OperationParser { public static final String COMPONENTS_REF = "#/components/schemas/"; - public static Optional getRequestBody(io.swagger.oas.annotations.parameters.RequestBody requestBody, Consumes classConsumes, Consumes methodConsumes, Components components) { + public static Optional getRequestBody(io.swagger.v3.oas.annotations.parameters.RequestBody requestBody, Consumes classConsumes, Consumes methodConsumes, Components components) { if (requestBody == null) { return Optional.empty(); } @@ -46,12 +47,12 @@ public static Optional getRequestBody(io.swagger.oas.annotations.pa return Optional.of(requestBodyObject); } - public static Optional getApiResponses(final io.swagger.oas.annotations.responses.ApiResponse[] responses, Produces classProduces, Produces methodProduces, Components components) { + public static Optional getApiResponses(final io.swagger.v3.oas.annotations.responses.ApiResponse[] responses, Produces classProduces, Produces methodProduces, Components components) { if (responses == null) { return Optional.empty(); } ApiResponses apiResponsesObject = new ApiResponses(); - for (io.swagger.oas.annotations.responses.ApiResponse response : responses) { + for (io.swagger.v3.oas.annotations.responses.ApiResponse response : responses) { ApiResponse apiResponseObject = new ApiResponse(); if (StringUtils.isNotBlank(response.description())) { apiResponseObject.setDescription(response.description()); @@ -78,7 +79,7 @@ public static Optional getApiResponses(final io.swagger.oas.annota return Optional.of(apiResponsesObject); } - public static Optional getContent(io.swagger.oas.annotations.media.Content[] annotationContents, String[] classTypes, String[] methodTypes, Components components) { + public static Optional getContent(io.swagger.v3.oas.annotations.media.Content[] annotationContents, String[] classTypes, String[] methodTypes, Components components) { if (annotationContents == null) { return Optional.empty(); } @@ -86,7 +87,7 @@ public static Optional getContent(io.swagger.oas.annotations.media.Cont //Encapsulating Content model Content content = new Content(); - for (io.swagger.oas.annotations.media.Content annotationContent : annotationContents) { + for (io.swagger.v3.oas.annotations.media.Content annotationContent : annotationContents) { MediaType mediaType = new MediaType(); getSchema(annotationContent, components).ifPresent(mediaType::setSchema); @@ -94,8 +95,8 @@ public static Optional getContent(io.swagger.oas.annotations.media.Cont for (ExampleObject example : examples) { AnnotationsUtils.getExample(example).ifPresent(exampleObject -> mediaType.addExamples(example.name(), exampleObject)); } - io.swagger.oas.annotations.media.Encoding[] encodings = annotationContent.encoding(); - for (io.swagger.oas.annotations.media.Encoding encoding : encodings) { + Encoding[] encodings = annotationContent.encoding(); + for (Encoding encoding : encodings) { AnnotationsUtils.addEncodingToMediaType(mediaType, encoding); } if (StringUtils.isNotBlank(annotationContent.mediaType())) { @@ -112,7 +113,7 @@ public static Optional getContent(io.swagger.oas.annotations.media.Cont return Optional.of(content); } - public static Optional getSchema(io.swagger.oas.annotations.media.Content annotationContent, Components components) { + public static Optional getSchema(io.swagger.v3.oas.annotations.media.Content annotationContent, Components components) { Class schemaImplementation = annotationContent.schema().implementation(); Map schemaMap; if (schemaImplementation != Void.class) { diff --git a/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/Reader.java b/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/Reader.java index 6264ef3d2f..bc937e7efb 100644 --- a/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/Reader.java +++ b/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/Reader.java @@ -10,8 +10,9 @@ import io.swagger.jaxrs2.ext.OpenAPIExtension; import io.swagger.jaxrs2.ext.OpenAPIExtensions; import io.swagger.jaxrs2.util.ReaderUtils; -import io.swagger.oas.annotations.ExternalDocumentation; -import io.swagger.oas.annotations.extensions.Extension; +import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.OpenAPIDefinition; +import io.swagger.v3.oas.annotations.extensions.Extension; import io.swagger.oas.integration.ContextUtils; import io.swagger.oas.integration.SwaggerConfiguration; import io.swagger.oas.integration.api.OpenAPIConfiguration; @@ -37,6 +38,8 @@ import io.swagger.util.ParameterProcessor; import io.swagger.util.PathUtils; import io.swagger.util.ReflectionUtils; +import io.swagger.v3.oas.annotations.info.Info; +import io.swagger.v3.oas.annotations.servers.Server; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -220,11 +223,11 @@ protected String resolveApplicationPath() { public OpenAPI read(Class cls, String parentPath) { - List apiSecurityScheme = ReflectionUtils.getRepeatableAnnotations(cls, io.swagger.oas.annotations.security.SecurityScheme.class); - io.swagger.oas.annotations.ExternalDocumentation apiExternalDocs = ReflectionUtils.getAnnotation(cls, io.swagger.oas.annotations.ExternalDocumentation.class); + List apiSecurityScheme = ReflectionUtils.getRepeatableAnnotations(cls, io.swagger.v3.oas.annotations.security.SecurityScheme.class); + ExternalDocumentation apiExternalDocs = ReflectionUtils.getAnnotation(cls, ExternalDocumentation.class); // TODO process full @OpenAPIDefinition - io.swagger.oas.annotations.OpenAPIDefinition openAPIDefinition = ReflectionUtils.getAnnotation(cls, io.swagger.oas.annotations.OpenAPIDefinition.class); - io.swagger.oas.annotations.info.Info apiInfo = null; + OpenAPIDefinition openAPIDefinition = ReflectionUtils.getAnnotation(cls, OpenAPIDefinition.class); + Info apiInfo = null; if (openAPIDefinition != null) { apiInfo = openAPIDefinition.info(); } @@ -232,7 +235,7 @@ public OpenAPI read(Class cls, String parentPath) { classProduces = ReflectionUtils.getAnnotation(cls, javax.ws.rs.Produces.class); if (apiSecurityScheme != null) { - for (io.swagger.oas.annotations.security.SecurityScheme securitySchemeAnnotation: apiSecurityScheme) { + for (io.swagger.v3.oas.annotations.security.SecurityScheme securitySchemeAnnotation: apiSecurityScheme) { Optional securityScheme = SecurityParser.getSecurityScheme(securitySchemeAnnotation); if (securityScheme.isPresent()) { Map securitySchemeMap = new HashMap<>(); @@ -385,7 +388,7 @@ protected void processRequestBody(Parameter requestBodyParameter, Operation oper List operationParameters, Annotation[] paramAnnotations, Type type) { if (operation.getRequestBody() == null) { - io.swagger.oas.annotations.parameters.RequestBody requestBodyAnnotation = getRequestBody(Arrays.asList(paramAnnotations)); + io.swagger.v3.oas.annotations.parameters.RequestBody requestBodyAnnotation = getRequestBody(Arrays.asList(paramAnnotations)); if (requestBodyAnnotation != null) { Optional optionalRequestBody = OperationParser.getRequestBody(requestBodyAnnotation, classConsumes, methodConsumes, components); if (optionalRequestBody.isPresent()) { @@ -438,13 +441,13 @@ protected void processRequestBody(Parameter requestBodyParameter, Operation oper } } - private io.swagger.oas.annotations.parameters.RequestBody getRequestBody(List annotations) { + private io.swagger.v3.oas.annotations.parameters.RequestBody getRequestBody(List annotations) { if (annotations == null) { return null; } for (Annotation a : annotations) { - if (a instanceof io.swagger.oas.annotations.parameters.RequestBody) { - return (io.swagger.oas.annotations.parameters.RequestBody) a; + if (a instanceof io.swagger.v3.oas.annotations.parameters.RequestBody) { + return (io.swagger.v3.oas.annotations.parameters.RequestBody) a; } } return null; @@ -464,14 +467,14 @@ public Operation parseMethod(Method method, List globalParameters) { private Operation parseMethod(Class cls, Method method, List globalParameters) { Operation operation = new Operation(); - io.swagger.oas.annotations.Operation apiOperation = ReflectionUtils.getAnnotation(method, io.swagger.oas.annotations.Operation.class); + io.swagger.v3.oas.annotations.Operation apiOperation = ReflectionUtils.getAnnotation(method, io.swagger.v3.oas.annotations.Operation.class); - List apiSecurity = ReflectionUtils.getRepeatableAnnotations(method, io.swagger.oas.annotations.security.SecurityRequirement.class); - List apiCallbacks = ReflectionUtils.getRepeatableAnnotations(method, io.swagger.oas.annotations.callbacks.Callback.class); - List apiServers = ReflectionUtils.getRepeatableAnnotations(method, io.swagger.oas.annotations.servers.Server.class); - List apiTags = ReflectionUtils.getRepeatableAnnotations(method, io.swagger.oas.annotations.tags.Tag.class); - List apiParameters = ReflectionUtils.getRepeatableAnnotations(method, io.swagger.oas.annotations.Parameter.class); - List apiResponses = ReflectionUtils.getRepeatableAnnotations(method, io.swagger.oas.annotations.responses.ApiResponse .class); + List apiSecurity = ReflectionUtils.getRepeatableAnnotations(method, io.swagger.v3.oas.annotations.security.SecurityRequirement.class); + List apiCallbacks = ReflectionUtils.getRepeatableAnnotations(method, io.swagger.v3.oas.annotations.callbacks.Callback.class); + List apiServers = ReflectionUtils.getRepeatableAnnotations(method, Server.class); + List apiTags = ReflectionUtils.getRepeatableAnnotations(method, io.swagger.v3.oas.annotations.tags.Tag.class); + List apiParameters = ReflectionUtils.getRepeatableAnnotations(method, io.swagger.v3.oas.annotations.Parameter.class); + List apiResponses = ReflectionUtils.getRepeatableAnnotations(method, io.swagger.v3.oas.annotations.responses.ApiResponse.class); // TODO extensions and external docs List apiExtensions = ReflectionUtils.getRepeatableAnnotations(method, Extension.class); ExternalDocumentation apiExternalDocumentation = ReflectionUtils.getAnnotation(method, ExternalDocumentation .class); @@ -480,7 +483,7 @@ private Operation parseMethod(Class cls, Method method, List globa Map callbacks = new LinkedHashMap<>(); if (apiCallbacks != null) { - for (io.swagger.oas.annotations.callbacks.Callback methodCallback : apiCallbacks) { + for (io.swagger.v3.oas.annotations.callbacks.Callback methodCallback : apiCallbacks) { Map currentCallbacks = getCallbacks(methodCallback); callbacks.putAll(currentCallbacks); } @@ -491,12 +494,12 @@ private Operation parseMethod(Class cls, Method method, List globa // security if (apiSecurity != null) { - SecurityParser.getSecurityRequirements(apiSecurity.toArray(new io.swagger.oas.annotations.security.SecurityRequirement[apiSecurity.size()])).ifPresent(operation::setSecurity); + SecurityParser.getSecurityRequirements(apiSecurity.toArray(new io.swagger.v3.oas.annotations.security.SecurityRequirement[apiSecurity.size()])).ifPresent(operation::setSecurity); } // servers if (apiServers != null) { - AnnotationsUtils.getServers(apiServers.toArray(new io.swagger.oas.annotations.servers.Server[apiServers.size()])).ifPresent(servers -> servers.forEach(operation::addServersItem)); + AnnotationsUtils.getServers(apiServers.toArray(new Server[apiServers.size()])).ifPresent(servers -> servers.forEach(operation::addServersItem)); } // tags @@ -505,7 +508,7 @@ private Operation parseMethod(Class cls, Method method, List globa .filter(t -> operation.getTags() == null || (operation.getTags() != null && !operation.getTags().contains(t.name()))) .map(t -> t.name()) .forEach(operation::addTagsItem); - AnnotationsUtils.getTags(apiTags.toArray(new io.swagger.oas.annotations.tags.Tag[apiTags.size()])).ifPresent(tags -> openApiTags.addAll(tags)); + AnnotationsUtils.getTags(apiTags.toArray(new io.swagger.v3.oas.annotations.tags.Tag[apiTags.size()])).ifPresent(tags -> openApiTags.addAll(tags)); } // parameters @@ -517,7 +520,7 @@ private Operation parseMethod(Class cls, Method method, List globa if (apiParameters != null) { getParametersListFromAnnotation( //OperationParser.getParametersList( - apiParameters.toArray(new io.swagger.oas.annotations.Parameter[apiParameters.size()]), + apiParameters.toArray(new io.swagger.v3.oas.annotations.Parameter[apiParameters.size()]), classConsumes, methodConsumes, operation).ifPresent(p -> p.forEach(operation::addParametersItem)); @@ -525,7 +528,7 @@ private Operation parseMethod(Class cls, Method method, List globa // apiResponses if (apiResponses != null) { - OperationParser.getApiResponses(apiResponses.toArray(new io.swagger.oas.annotations.responses.ApiResponse[apiResponses.size()]), classProduces, methodProduces, components).ifPresent(responses -> { + OperationParser.getApiResponses(apiResponses.toArray(new io.swagger.v3.oas.annotations.responses.ApiResponse[apiResponses.size()]), classProduces, methodProduces, components).ifPresent(responses -> { if (operation.getResponses() == null) { operation.setResponses(responses); } else { @@ -602,14 +605,14 @@ private boolean shouldIgnoreClass(String className) { return ignore; } - private Map getCallbacks(io.swagger.oas.annotations.callbacks.Callback apiCallback) { + private Map getCallbacks(io.swagger.v3.oas.annotations.callbacks.Callback apiCallback) { Map callbackMap = new HashMap<>(); if (apiCallback == null) { return callbackMap; } Callback callbackObject = new Callback(); PathItem pathItemObject = new PathItem(); - for (io.swagger.oas.annotations.Operation callbackOperation : apiCallback.operation()) { + for (io.swagger.v3.oas.annotations.Operation callbackOperation : apiCallback.operation()) { Operation callbackNewOperation = new Operation(); setOperationObjectFromApiOperationAnnotation(callbackNewOperation, callbackOperation); setPathItemOperation(pathItemObject, callbackOperation.method(), callbackNewOperation); @@ -653,7 +656,7 @@ private void setPathItemOperation(PathItem pathItemObject, String method, Operat } } - private void setOperationObjectFromApiOperationAnnotation(Operation operation, io.swagger.oas.annotations.Operation apiOperation) { + private void setOperationObjectFromApiOperationAnnotation(Operation operation, io.swagger.v3.oas.annotations.Operation apiOperation) { if (StringUtils.isNotBlank(apiOperation.summary())) { operation.setSummary(apiOperation.summary()); } @@ -744,12 +747,12 @@ private boolean existOperationId(String operationId) { return false; } - protected Optional> getParametersListFromAnnotation(io.swagger.oas.annotations.Parameter[] parameters, Consumes classConsumes, Consumes methodConsumes, Operation operation) { + protected Optional> getParametersListFromAnnotation(io.swagger.v3.oas.annotations.Parameter[] parameters, Consumes classConsumes, Consumes methodConsumes, Operation operation) { if (parameters == null) { return Optional.empty(); } List parametersObject = new ArrayList<>(); - for (io.swagger.oas.annotations.Parameter parameter : parameters) { + for (io.swagger.v3.oas.annotations.Parameter parameter : parameters) { ResolvedParameter resolvedParameter = getParameters(ParameterProcessor.getParameterType(parameter), Collections.singletonList(parameter), operation, classConsumes, methodConsumes); parametersObject.addAll(resolvedParameter.parameters); @@ -809,7 +812,7 @@ private String extractOperationIdFromPathItem(PathItem path) { } protected boolean isOperationHidden(Method method) { - io.swagger.oas.annotations.Operation apiOperation = ReflectionUtils.getAnnotation(method, io.swagger.oas.annotations.Operation.class); + io.swagger.v3.oas.annotations.Operation apiOperation = ReflectionUtils.getAnnotation(method, io.swagger.v3.oas.annotations.Operation.class); if (apiOperation != null && apiOperation.hidden()) { return true; } diff --git a/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/SecurityParser.java b/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/SecurityParser.java index c1754c6b82..2ae4ecad66 100644 --- a/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/SecurityParser.java +++ b/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/SecurityParser.java @@ -5,7 +5,7 @@ import io.swagger.oas.models.security.Scopes; import io.swagger.oas.models.security.SecurityRequirement; import io.swagger.oas.models.security.SecurityScheme; -import io.swagger.oas.annotations.security.OAuthScope; +import io.swagger.v3.oas.annotations.security.OAuthScope; import org.apache.commons.lang3.StringUtils; import java.util.ArrayList; @@ -15,12 +15,12 @@ public class SecurityParser { - public static Optional> getSecurityRequirements(io.swagger.oas.annotations.security.SecurityRequirement[] securityRequirementsApi) { + public static Optional> getSecurityRequirements(io.swagger.v3.oas.annotations.security.SecurityRequirement[] securityRequirementsApi) { if (securityRequirementsApi == null || securityRequirementsApi.length == 0) { return Optional.empty(); } List securityRequirements = new ArrayList<>(); - for (io.swagger.oas.annotations.security.SecurityRequirement securityRequirementApi: securityRequirementsApi) { + for (io.swagger.v3.oas.annotations.security.SecurityRequirement securityRequirementApi: securityRequirementsApi) { if (StringUtils.isBlank(securityRequirementApi.name())) { continue; } @@ -38,7 +38,7 @@ public static Optional> getSecurityRequirements(io.swa return Optional.of(securityRequirements); } - public static Optional getSecurityScheme(io.swagger.oas.annotations.security.SecurityScheme securityScheme) { + public static Optional getSecurityScheme(io.swagger.v3.oas.annotations.security.SecurityScheme securityScheme) { if (securityScheme == null) { return Optional.empty(); } @@ -71,7 +71,7 @@ public static Optional getSecurityScheme(io.swagger.oas.annotati return Optional.of(securitySchemeObject); } - public static Optional getOAuthFlows(io.swagger.oas.annotations.security.OAuthFlows oAuthFlows) { + public static Optional getOAuthFlows(io.swagger.v3.oas.annotations.security.OAuthFlows oAuthFlows) { if (isEmpty(oAuthFlows)) { return Optional.empty(); } @@ -83,7 +83,7 @@ public static Optional getOAuthFlows(io.swagger.oas.annotations.secu return Optional.of(oAuthFlowsObject); } - public static Optional getOAuthFlow(io.swagger.oas.annotations.security.OAuthFlow oAuthFlow) { + public static Optional getOAuthFlow(io.swagger.v3.oas.annotations.security.OAuthFlow oAuthFlow) { if (isEmpty(oAuthFlow)) { return Optional.empty(); } @@ -122,7 +122,7 @@ private static SecurityScheme.Type getType(String value) { return Arrays.stream(SecurityScheme.Type.values()).filter(i -> i.toString().equals(value)).findFirst().orElse(null); } - private static boolean isEmpty(io.swagger.oas.annotations.security.OAuthFlows oAuthFlows) { + private static boolean isEmpty(io.swagger.v3.oas.annotations.security.OAuthFlows oAuthFlows) { if (oAuthFlows == null) { return true; } @@ -141,7 +141,7 @@ private static boolean isEmpty(io.swagger.oas.annotations.security.OAuthFlows oA return true; } - private static boolean isEmpty(io.swagger.oas.annotations.security.OAuthFlow oAuthFlow) { + private static boolean isEmpty(io.swagger.v3.oas.annotations.security.OAuthFlow oAuthFlow) { if (oAuthFlow == null) { return true; } diff --git a/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/integration/resources/AcceptHeaderOpenApiResource.java b/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/integration/resources/AcceptHeaderOpenApiResource.java index 102aa20abf..0ecd22107c 100644 --- a/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/integration/resources/AcceptHeaderOpenApiResource.java +++ b/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/integration/resources/AcceptHeaderOpenApiResource.java @@ -1,6 +1,6 @@ package io.swagger.jaxrs2.integration.resources; -import io.swagger.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Operation; import javax.servlet.ServletConfig; import javax.ws.rs.GET; diff --git a/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/integration/resources/OpenApiResource.java b/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/integration/resources/OpenApiResource.java index d90765850c..9fb6247668 100644 --- a/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/integration/resources/OpenApiResource.java +++ b/modules/swagger-jaxrs2/src/main/java/io/swagger/jaxrs2/integration/resources/OpenApiResource.java @@ -1,6 +1,6 @@ package io.swagger.jaxrs2.integration.resources; -import io.swagger.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Operation; import javax.servlet.ServletConfig; import javax.ws.rs.GET; diff --git a/modules/swagger-jaxrs2/src/test/java/com/my/project/resources/ResourceInPackageA.java b/modules/swagger-jaxrs2/src/test/java/com/my/project/resources/ResourceInPackageA.java index c852bf286d..fe93d777bb 100644 --- a/modules/swagger-jaxrs2/src/test/java/com/my/project/resources/ResourceInPackageA.java +++ b/modules/swagger-jaxrs2/src/test/java/com/my/project/resources/ResourceInPackageA.java @@ -1,7 +1,7 @@ package com.my.project.resources; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import javax.ws.rs.GET; import javax.ws.rs.Path; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/ReaderTest.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/ReaderTest.java index 31f9fae8b8..bc58c23acf 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/ReaderTest.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/ReaderTest.java @@ -1,6 +1,5 @@ package io.swagger.jaxrs2; -import io.swagger.jaxrs2.resources.BasicClass; import io.swagger.jaxrs2.resources.BasicFieldsResource; import io.swagger.jaxrs2.resources.CompleteFieldsResource; import io.swagger.jaxrs2.resources.DeprecatedFieldsResource; @@ -349,7 +348,7 @@ static class ClassWithGenericType { @Produces("application/json") @Consumes("application/json") @GET - @io.swagger.oas.annotations.Operation(tags="/receiver/rest") + @io.swagger.v3.oas.annotations.Operation(tags="/receiver/rest") //public void test1(@QueryParam("aa") String a) { public void test1(A a) { } diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/callbacks/CallbackTest.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/callbacks/CallbackTest.java index 90d5826326..f799873515 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/callbacks/CallbackTest.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/callbacks/CallbackTest.java @@ -1,14 +1,14 @@ package io.swagger.jaxrs2.annotations.callbacks; import io.swagger.jaxrs2.annotations.AbstractAnnotationTest; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.Parameter; -import io.swagger.oas.annotations.callbacks.Callback; -import io.swagger.oas.annotations.enums.ParameterIn; -import io.swagger.oas.annotations.callbacks.Callbacks; -import io.swagger.oas.annotations.media.Content; -import io.swagger.oas.annotations.media.Schema; -import io.swagger.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.callbacks.Callback; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.callbacks.Callbacks; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; import org.testng.annotations.Test; import javax.ws.rs.GET; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/encoding/EncodingTest.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/encoding/EncodingTest.java index 168ba6d6c9..e3b569c27a 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/encoding/EncodingTest.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/encoding/EncodingTest.java @@ -16,18 +16,18 @@ import javax.ws.rs.GET; import javax.ws.rs.Path; -import io.swagger.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.enums.ParameterIn; import org.testng.annotations.Test; import io.swagger.jaxrs2.annotations.AbstractAnnotationTest; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.Parameter; -import io.swagger.oas.annotations.headers.Header; -import io.swagger.oas.annotations.media.Content; -import io.swagger.oas.annotations.media.Encoding; -import io.swagger.oas.annotations.media.Schema; -import io.swagger.oas.annotations.parameters.RequestBody; -import io.swagger.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.headers.Header; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Encoding; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.parameters.RequestBody; +import io.swagger.v3.oas.annotations.responses.ApiResponse; public class EncodingTest extends AbstractAnnotationTest { //Test encoding inside ApiResponse/Content diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/examples/ExamplesTest.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/examples/ExamplesTest.java index ce744564e3..8515df7058 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/examples/ExamplesTest.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/examples/ExamplesTest.java @@ -2,15 +2,15 @@ import io.swagger.jaxrs2.annotations.AbstractAnnotationTest; import io.swagger.jaxrs2.resources.model.User; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.Parameter; -import io.swagger.oas.annotations.enums.ParameterIn; -import io.swagger.oas.annotations.enums.ParameterStyle; -import io.swagger.oas.annotations.media.Content; -import io.swagger.oas.annotations.media.ExampleObject; -import io.swagger.oas.annotations.media.Schema; -import io.swagger.oas.annotations.parameters.RequestBody; -import io.swagger.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.enums.ParameterStyle; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.parameters.RequestBody; +import io.swagger.v3.oas.annotations.responses.ApiResponse; import org.testng.annotations.Test; import javax.ws.rs.POST; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/info/InfoTest.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/info/InfoTest.java index 3c5c399702..a725d7fef6 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/info/InfoTest.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/info/InfoTest.java @@ -1,10 +1,10 @@ package io.swagger.jaxrs2.annotations.info; import io.swagger.jaxrs2.annotations.AbstractAnnotationTest; -import io.swagger.oas.annotations.OpenAPIDefinition; -import io.swagger.oas.annotations.info.Contact; -import io.swagger.oas.annotations.info.Info; -import io.swagger.oas.annotations.info.License; +import io.swagger.v3.oas.annotations.OpenAPIDefinition; +import io.swagger.v3.oas.annotations.info.Contact; +import io.swagger.v3.oas.annotations.info.Info; +import io.swagger.v3.oas.annotations.info.License; import org.testng.annotations.Test; import static org.testng.Assert.assertEquals; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/operations/AnnotatedOperationMethodTest.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/operations/AnnotatedOperationMethodTest.java index 3e9146ea60..d43b5a1920 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/operations/AnnotatedOperationMethodTest.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/operations/AnnotatedOperationMethodTest.java @@ -5,15 +5,15 @@ import io.swagger.jaxrs2.resources.PetResource; import io.swagger.jaxrs2.resources.SimpleUserResource; import io.swagger.jaxrs2.resources.UserResource; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.Parameter; -import io.swagger.oas.annotations.enums.ParameterIn; -import io.swagger.oas.annotations.headers.Header; -import io.swagger.oas.annotations.media.Content; -import io.swagger.oas.annotations.media.ExampleObject; -import io.swagger.oas.annotations.media.Schema; -import io.swagger.oas.annotations.responses.ApiResponse; -import io.swagger.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.headers.Header; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; import org.testng.annotations.Test; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/operations/MergedOperationTest.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/operations/MergedOperationTest.java index f1da157ab6..3dc5ad09b3 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/operations/MergedOperationTest.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/operations/MergedOperationTest.java @@ -1,9 +1,9 @@ package io.swagger.jaxrs2.annotations.operations; import io.swagger.jaxrs2.annotations.AbstractAnnotationTest; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.media.Schema; -import io.swagger.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; import org.testng.annotations.Test; import javax.ws.rs.GET; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/parameters/ParametersTest.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/parameters/ParametersTest.java index e683d122d9..bcb730dc54 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/parameters/ParametersTest.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/parameters/ParametersTest.java @@ -3,15 +3,15 @@ import io.swagger.jaxrs2.Reader; import io.swagger.jaxrs2.annotations.AbstractAnnotationTest; import io.swagger.jaxrs2.resources.ResourceWithKnownInjections; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.Parameter; -import io.swagger.oas.annotations.enums.Explode; -import io.swagger.oas.annotations.enums.ParameterIn; -import io.swagger.oas.annotations.enums.ParameterStyle; -import io.swagger.oas.annotations.media.ArraySchema; -import io.swagger.oas.annotations.media.Content; -import io.swagger.oas.annotations.media.Schema; -import io.swagger.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.enums.Explode; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.enums.ParameterStyle; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.oas.models.OpenAPI; import io.swagger.util.Yaml; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/pathItems/OperationsWithLinksTest.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/pathItems/OperationsWithLinksTest.java index 82b3a84e63..bda825a696 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/pathItems/OperationsWithLinksTest.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/pathItems/OperationsWithLinksTest.java @@ -1,12 +1,12 @@ package io.swagger.jaxrs2.annotations.pathItems; import io.swagger.jaxrs2.annotations.AbstractAnnotationTest; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.links.Link; -import io.swagger.oas.annotations.links.LinkParameter; -import io.swagger.oas.annotations.media.Content; -import io.swagger.oas.annotations.media.Schema; -import io.swagger.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.links.Link; +import io.swagger.v3.oas.annotations.links.LinkParameter; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; import org.testng.annotations.Test; import javax.ws.rs.GET; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/requests/RequestBodyTest.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/requests/RequestBodyTest.java index 880d6c41ec..7389efd0ea 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/requests/RequestBodyTest.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/requests/RequestBodyTest.java @@ -3,10 +3,10 @@ import io.swagger.jaxrs2.annotations.AbstractAnnotationTest; import io.swagger.jaxrs2.resources.model.Pet; import io.swagger.jaxrs2.resources.model.User; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.media.Content; -import io.swagger.oas.annotations.media.Schema; -import io.swagger.oas.annotations.parameters.RequestBody; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.parameters.RequestBody; import org.testng.annotations.Test; import javax.ws.rs.Consumes; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/security/SecurityTests.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/security/SecurityTests.java index e3e256cd55..40f5bae382 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/security/SecurityTests.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/annotations/security/SecurityTests.java @@ -1,13 +1,13 @@ package io.swagger.jaxrs2.annotations.security; import io.swagger.jaxrs2.annotations.AbstractAnnotationTest; -import io.swagger.oas.annotations.enums.SecuritySchemeIn; -import io.swagger.oas.annotations.enums.SecuritySchemeType; -import io.swagger.oas.annotations.security.OAuthFlow; -import io.swagger.oas.annotations.security.OAuthFlows; -import io.swagger.oas.annotations.security.OAuthScope; -import io.swagger.oas.annotations.security.SecurityRequirement; -import io.swagger.oas.annotations.security.SecurityScheme; +import io.swagger.v3.oas.annotations.enums.SecuritySchemeIn; +import io.swagger.v3.oas.annotations.enums.SecuritySchemeType; +import io.swagger.v3.oas.annotations.security.OAuthFlow; +import io.swagger.v3.oas.annotations.security.OAuthFlows; +import io.swagger.v3.oas.annotations.security.OAuthScope; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.security.SecurityScheme; import org.testng.annotations.Test; import static org.testng.Assert.assertEquals; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/BasicFieldsResource.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/BasicFieldsResource.java index c226ec546e..c452261e7a 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/BasicFieldsResource.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/BasicFieldsResource.java @@ -1,12 +1,12 @@ package io.swagger.jaxrs2.resources; import io.swagger.jaxrs2.resources.model.Category; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.Parameter; -import io.swagger.oas.annotations.enums.ParameterIn; -import io.swagger.oas.annotations.media.ArraySchema; -import io.swagger.oas.annotations.media.Content; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; import javax.ws.rs.GET; import javax.ws.rs.Path; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/CompleteFieldsResource.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/CompleteFieldsResource.java index 103115e0d6..33f9dba803 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/CompleteFieldsResource.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/CompleteFieldsResource.java @@ -1,12 +1,12 @@ package io.swagger.jaxrs2.resources; -import io.swagger.oas.annotations.ExternalDocumentation; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.Parameter; -import io.swagger.oas.annotations.enums.ParameterIn; -import io.swagger.oas.annotations.media.Content; -import io.swagger.oas.annotations.media.Schema; -import io.swagger.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; import javax.ws.rs.GET; import javax.ws.rs.Path; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/DeprecatedFieldsResource.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/DeprecatedFieldsResource.java index eba0af2dcb..82cfd98bf5 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/DeprecatedFieldsResource.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/DeprecatedFieldsResource.java @@ -1,5 +1,7 @@ package io.swagger.jaxrs2.resources; +import io.swagger.v3.oas.annotations.Operation; + import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.core.Response; @@ -7,7 +9,7 @@ public class DeprecatedFieldsResource { @GET @Path("/") - @io.swagger.oas.annotations.Operation(deprecated = true) + @Operation(deprecated = true) public Response deprecatedMethod() { return Response.ok().entity("ok").build(); } diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/DuplicatedOperationIdResource.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/DuplicatedOperationIdResource.java index e5cf8c9a08..b821ac2376 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/DuplicatedOperationIdResource.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/DuplicatedOperationIdResource.java @@ -1,6 +1,6 @@ package io.swagger.jaxrs2.resources; -import io.swagger.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Operation; import javax.ws.rs.GET; import javax.ws.rs.Path; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/DuplicatedSecurityResource.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/DuplicatedSecurityResource.java index 5990d81ba5..3849ef159e 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/DuplicatedSecurityResource.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/DuplicatedSecurityResource.java @@ -1,13 +1,13 @@ package io.swagger.jaxrs2.resources; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.enums.SecuritySchemeIn; -import io.swagger.oas.annotations.enums.SecuritySchemeType; -import io.swagger.oas.annotations.security.OAuthFlow; -import io.swagger.oas.annotations.security.OAuthFlows; -import io.swagger.oas.annotations.security.OAuthScope; -import io.swagger.oas.annotations.security.SecurityRequirement; -import io.swagger.oas.annotations.security.SecurityScheme; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.enums.SecuritySchemeIn; +import io.swagger.v3.oas.annotations.enums.SecuritySchemeType; +import io.swagger.v3.oas.annotations.security.OAuthFlow; +import io.swagger.v3.oas.annotations.security.OAuthFlows; +import io.swagger.v3.oas.annotations.security.OAuthScope; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.security.SecurityScheme; import javax.ws.rs.GET; import javax.ws.rs.Path; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/ExternalDocsReference.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/ExternalDocsReference.java index 81a391a3c2..e524b3ea5d 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/ExternalDocsReference.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/ExternalDocsReference.java @@ -1,7 +1,7 @@ package io.swagger.jaxrs2.resources; -import io.swagger.oas.annotations.ExternalDocumentation; -import io.swagger.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.Operation; import javax.ws.rs.GET; import javax.ws.rs.Path; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/HiddenUserResource.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/HiddenUserResource.java index b08ef53bd6..46306b8837 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/HiddenUserResource.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/HiddenUserResource.java @@ -18,8 +18,8 @@ import io.swagger.jaxrs2.resources.data.UserData; import io.swagger.jaxrs2.resources.model.User; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import javax.ws.rs.POST; import javax.ws.rs.Path; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/ParametersResource.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/ParametersResource.java index 4ef6ffeb66..e2f6aaed2d 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/ParametersResource.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/ParametersResource.java @@ -1,9 +1,9 @@ package io.swagger.jaxrs2.resources; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.Parameter; -import io.swagger.oas.annotations.enums.ParameterIn; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; import javax.ws.rs.GET; import javax.ws.rs.Path; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/PetResource.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/PetResource.java index 5194f32564..48eaa41f75 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/PetResource.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/PetResource.java @@ -18,11 +18,11 @@ import io.swagger.jaxrs2.resources.data.PetData; import io.swagger.jaxrs2.resources.model.Pet; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.Parameter; -import io.swagger.oas.annotations.media.Content; -import io.swagger.oas.annotations.media.Schema; -import io.swagger.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; import javax.ws.rs.BeanParam; import javax.ws.rs.Consumes; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/ReaderListenerResource.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/ReaderListenerResource.java index 3bb7259b27..ba5f18e8ed 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/ReaderListenerResource.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/ReaderListenerResource.java @@ -2,10 +2,10 @@ import io.swagger.jaxrs2.Reader; import io.swagger.jaxrs2.ReaderListener; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.Parameter; -import io.swagger.oas.annotations.enums.ParameterIn; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.oas.models.OpenAPI; import io.swagger.oas.models.tags.Tag; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/ResourceWithKnownInjections.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/ResourceWithKnownInjections.java index bffe2898bb..04198e7e38 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/ResourceWithKnownInjections.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/ResourceWithKnownInjections.java @@ -2,8 +2,8 @@ import javax.ws.rs.Path; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import javax.servlet.ServletConfig; import javax.ws.rs.GET; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/ResponsesResource.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/ResponsesResource.java index 9999dff25e..ec16eada5a 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/ResponsesResource.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/ResponsesResource.java @@ -1,10 +1,10 @@ package io.swagger.jaxrs2.resources; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.media.Content; -import io.swagger.oas.annotations.media.Schema; -import io.swagger.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; import javax.ws.rs.GET; import javax.ws.rs.Path; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/SecurityResource.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/SecurityResource.java index 55edf21d62..32690ab819 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/SecurityResource.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/SecurityResource.java @@ -1,9 +1,13 @@ package io.swagger.jaxrs2.resources; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.enums.SecuritySchemeIn; -import io.swagger.oas.annotations.enums.SecuritySchemeType; -import io.swagger.oas.annotations.security.*; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.enums.SecuritySchemeIn; +import io.swagger.v3.oas.annotations.enums.SecuritySchemeType; +import io.swagger.v3.oas.annotations.security.OAuthFlow; +import io.swagger.v3.oas.annotations.security.OAuthFlows; +import io.swagger.v3.oas.annotations.security.OAuthScope; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.security.SecurityScheme; import javax.ws.rs.GET; import javax.ws.rs.Path; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/SimpleCallbackResource.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/SimpleCallbackResource.java index 36f5217373..c48cb2e2a9 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/SimpleCallbackResource.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/SimpleCallbackResource.java @@ -1,11 +1,11 @@ package io.swagger.jaxrs2.resources; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.Parameter; -import io.swagger.oas.annotations.callbacks.Callback; -import io.swagger.oas.annotations.enums.ParameterIn; -import io.swagger.oas.annotations.media.Schema; -import io.swagger.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.callbacks.Callback; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; import javax.ws.rs.HeaderParam; import javax.ws.rs.POST; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/SimpleUserResource.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/SimpleUserResource.java index 0e0150c311..8e5014333e 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/SimpleUserResource.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/SimpleUserResource.java @@ -18,8 +18,8 @@ import io.swagger.jaxrs2.resources.data.UserData; import io.swagger.jaxrs2.resources.model.User; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import javax.ws.rs.POST; import javax.ws.rs.Path; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/TagsResource.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/TagsResource.java index 56cf97a30d..dd0374d3df 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/TagsResource.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/TagsResource.java @@ -1,6 +1,6 @@ package io.swagger.jaxrs2.resources; -import io.swagger.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Operation; import javax.ws.rs.GET; import javax.ws.rs.Path; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/UserResource.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/UserResource.java index 213673b38b..5658ba2dcd 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/UserResource.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/UserResource.java @@ -20,12 +20,12 @@ import io.swagger.jaxrs2.resources.exception.ApiException; import io.swagger.jaxrs2.resources.exception.NotFoundException; import io.swagger.jaxrs2.resources.model.User; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.Parameter; -import io.swagger.oas.annotations.media.Content; -import io.swagger.oas.annotations.media.ExampleObject; -import io.swagger.oas.annotations.media.Schema; -import io.swagger.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; import javax.ws.rs.DELETE; import javax.ws.rs.GET; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/model/Pet.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/model/Pet.java index 0b3c792fa8..aad43a3f07 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/model/Pet.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/model/Pet.java @@ -1,7 +1,7 @@ package io.swagger.jaxrs2.resources.model; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; diff --git a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/model/User.java b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/model/User.java index df8fd36677..f761bf5a3e 100644 --- a/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/model/User.java +++ b/modules/swagger-jaxrs2/src/test/java/io/swagger/jaxrs2/resources/model/User.java @@ -16,7 +16,7 @@ package io.swagger.jaxrs2.resources.model; -import io.swagger.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.media.Schema; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; diff --git a/modules/swagger-jaxrs2/src/test/java/org/my/project/resources/ResourceInPackageB.java b/modules/swagger-jaxrs2/src/test/java/org/my/project/resources/ResourceInPackageB.java index c6d5cd1a41..4a1a6c1f6c 100644 --- a/modules/swagger-jaxrs2/src/test/java/org/my/project/resources/ResourceInPackageB.java +++ b/modules/swagger-jaxrs2/src/test/java/org/my/project/resources/ResourceInPackageB.java @@ -1,7 +1,7 @@ package org.my.project.resources; -import io.swagger.oas.annotations.Operation; -import io.swagger.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import javax.ws.rs.GET; import javax.ws.rs.Path; diff --git a/pom.xml b/pom.xml index a3126d852b..209b334220 100644 --- a/pom.xml +++ b/pom.xml @@ -139,14 +139,14 @@ org.apache.maven.plugins maven-javadoc-plugin - 2.7 + 2.10.4 true 1.8 UTF-8 1g - https://docs.oracle.com/javase/7/docs/api/ + http://docs.oracle.com/javase/8/docs/api ${javadoc.package.exclude} @@ -269,12 +269,14 @@ org.apache.maven.plugins maven-javadoc-plugin - 2.9 + 2.10.4 true + 1.8 + UTF-8 + 1g true - http://java.sun.com/javaee/7/docs/api https://docs.oracle.com/javase/8/docs/api