From afe30546f2af5fa0ed000de09c0eb88f78a55b88 Mon Sep 17 00:00:00 2001 From: bnasslah Date: Sun, 24 Apr 2022 00:39:52 +0200 Subject: [PATCH] Please add OpenAPI 3.1 supports. Fixes #1181 --- .../api/AbstractOpenApiResource.java | 52 +- .../api/mixins/SortedOpenAPIMixin31.java | 53 + .../api/mixins/SortedSchemaMixin31.java | 82 ++ .../core/GenericParameterService.java | 20 +- .../core/SpringDocAnnotationsUtils.java | 6 +- .../core/SpringDocConfigProperties.java | 63 +- .../core/SpringDocConfiguration.java | 58 +- .../springdoc/core/SpringDocProviders.java | 48 +- .../converters/AdditionalModelsConverter.java | 18 +- .../core/converters/FileSupportConverter.java | 18 +- .../converters/PageableOpenAPIConverter.java | 18 +- .../converters/PolymorphicModelConverter.java | 19 +- .../RequestTypeToIgnoreConverter.java | 18 +- .../converters/ResponseSupportConverter.java | 18 +- .../core/providers/ObjectMapperProvider.java | 89 ++ .../SpringCloudFunctionProvider.java | 55 +- .../ui/AbstractSwaggerIndexTransformer.java | 6 +- .../api/AbstractOpenApiResourceTest.java | 2 + .../data/rest/DataRestHalProvider.java | 20 +- .../rest/SpringDocDataRestConfiguration.java | 5 +- .../springdoc/api/app9/SpringDocApp9Test.java | 10 +- .../groovy/SpringDocGroovyConfiguration.java | 5 +- .../springdoc/hateoas/HateoasHalProvider.java | 11 +- .../SpringDocHateoasConfiguration.java | 13 +- .../springdoc/api/app6/SpringDocApp6Test.java | 10 +- .../javadoc/JavadocPropertyCustomizer.java | 14 +- .../SpringDocJavadocConfiguration.java | 8 +- .../api/app157/SpringDocApp157Test.java | 18 +- .../api/app157/StringyConverter.java | 15 +- .../app70/customizer/PropertyCustomizer.java | 9 +- .../app72/BlockingAutoConfigurationTest.java | 2 +- .../kotlin/SpringDocKotlinConfiguration.java | 17 +- .../springdoc/webmvc/ui/SwaggerConfig.java | 7 +- .../ui/SwaggerIndexPageTransformer.java | 6 +- .../springdoc/ui/app22/SpringDocTestApp.java | 7 +- .../core/SpringDocWebFluxConfiguration.java | 6 +- .../converters/WebFluxSupportConverter.java | 17 +- .../springdoc/webflux/ui/SwaggerConfig.java | 7 +- .../ui/SwaggerIndexPageTransformer.java | 7 +- .../springdoc/ui/app24/SpringDocConfig.java | 8 +- .../api/AbstractSpringDocActuatorTest.java | 27 - .../org/springdoc/api/app1/ApiException.java | 33 - .../org/springdoc/api/app1/ErrorMessage.java | 48 - .../springdoc/api/app1/HelloController.java | 40 - .../springdoc/api/app1/HomeController.java | 42 - .../org/springdoc/api/app1/PersonDTO.java | 60 - .../api/app10/SpringDocApp10Test.java | 29 - .../springdoc/api/app100/HelloController.java | 39 - .../org/springdoc/api/app100/PersonDTO.java | 63 - .../api/app100/SpringDocApp100Test.java | 31 - .../springdoc/api/app101/HelloController.java | 23 - .../org/springdoc/api/app101/HelloDTO.java | 21 - .../api/app101/SpringDocApp101Test.java | 33 - .../api/app102/InheritedRequestParams.java | 19 - .../api/app102/SpringDocApp102Test.java | 10 - .../springdoc/api/app102/TestController.java | 15 - .../org/springdoc/api/app103/ExampleBody.java | 23 - .../api/app103/SpringDocApp103Test.java | 10 - .../springdoc/api/app104/CrudController.java | 31 - .../test/org/springdoc/api/app104/Design.java | 4 - .../api/app104/DesignController.java | 14 - .../org/springdoc/api/app104/HavingPK.java | 4 - .../api/app104/SpringDocApp104Test.java | 10 - .../api/app105/api/HomeController.java | 42 - .../api/app105/api/pet/PetApiController.java | 44 - .../app105/api/pet/PetApiDelegateImpl.java | 27 - .../app105/api/store/StoreApiController.java | 44 - .../api/store/StoreApiDelegateImpl.java | 27 - .../app105/api/user/UserApiController.java | 44 - .../app105/api/user/UserApiDelegateImpl.java | 27 - .../api/app106/SpringDocApp106Test.java | 10 - .../springdoc/api/app107/HelloController.java | 36 - .../api/app107/SpringDocApp107Test.java | 10 - .../springdoc/api/app108/HelloController.java | 14 - .../api/app108/SpringDocApp108Test.java | 10 - .../springdoc/api/app109/HelloController.java | 25 - .../api/app109/SpringDocApp109Test.java | 10 - .../api/app11/SpringDocApp11Test.java | 30 - .../springdoc/api/app110/ErrorMessage.java | 34 - .../org/springdoc/api/app110/Problem.java | 35 - .../springdoc/api/app111/ErrorMessage.java | 34 - .../org/springdoc/api/app111/Problem.java | 35 - .../springdoc/api/app112/ErrorMessage.java | 34 - .../org/springdoc/api/app112/Problem.java | 35 - .../springdoc/api/app113/HelloController.java | 41 - .../api/app113/SpringDocApp113Test.java | 12 - .../springdoc/api/app114/HelloController.java | 43 - .../api/app114/SpringDocApp114Test.java | 19 - .../springdoc/api/app115/HelloController.java | 37 - .../api/app115/SpringDocApp115Test.java | 13 - .../springdoc/api/app116/FooErrorHandler.java | 15 - .../springdoc/api/app116/HelloController.java | 23 - .../api/app116/SpringDocApp116Test.java | 13 - .../api/app117/SpringDocApp117Test.java | 12 - .../api/app118/SpringDocApp118Test.java | 12 - .../org/springdoc/api/app119/JsonRequest.java | 14 - .../api/app119/SpringDocApp119Test.java | 12 - .../springdoc/api/app12/HelloController.java | 39 - .../api/app12/SpringDocApp12Test.java | 29 - .../api/app120/SpringDocApp120Test.java | 32 - .../api/app121/InheritedRequestParams.java | 20 - .../springdoc/api/app121/TestController.java | 16 - .../springdoc/api/app123/HelloController.java | 36 - .../api/app124/MyExceptionHandler.java | 34 - .../api/app125/DeprecatedEntity.java | 35 - .../springdoc/api/app125/HelloController.java | 25 - .../springdoc/api/app127/AbstractObject.java | 31 - .../springdoc/api/app127/ConcreteObjectA.java | 15 - .../springdoc/api/app127/ConcreteType.java | 16 - .../org/springdoc/api/app127/Umbrella.java | 17 - .../springdoc/api/app128/HelloController.java | 35 - .../api/app129/ActualReturnedEntity.java | 10 - .../api/app129/OperationResponse.java | 9 - .../springdoc/api/app13/HelloController.java | 32 - .../org/springdoc/api/app13/PersonDTO.java | 60 - .../api/app13/SpringDocApp13Test.java | 29 - .../springdoc/api/app130/HelloController.java | 37 - .../org/springdoc/api/app130/TrackerData.java | 41 - .../api/app131/RestControllerError.java | 13 - .../api/app132/RestControllerError.java | 13 - .../test/org/springdoc/api/app135/Book.java | 58 - .../springdoc/api/app135/BookRepository.java | 39 - .../springdoc/api/app137/HelloController.java | 33 - .../springdoc/api/app138/HelloController.java | 34 - .../springdoc/api/app139/HelloController.java | 39 - .../springdoc/api/app14/HelloController.java | 44 - .../api/app14/SpringDocApp14Test.java | 29 - .../api/app143/HelloHiddenController.java | 37 - .../api/app143/SpringDocApp143Test.java | 38 - .../springdoc/api/app144/HelloController.java | 32 - .../springdoc/api/app145/HelloController.java | 32 - .../springdoc/api/app146/HelloController.java | 32 - .../springdoc/api/app147/HelloController.java | 43 - .../springdoc/api/app148/HelloController.java | 43 - .../springdoc/api/app149/HelloMessage.java | 29 - .../api/app149/HiddenHelloController.java | 22 - .../api/app149/SpringDocApp149Test.java | 38 - .../springdoc/api/app15/HelloController.java | 39 - .../api/app150/SpringDocApp150Test.java | 34 - .../springdoc/api/app151/HelloController.java | 37 - .../api/app151/SpringDocApp151Test.java | 34 - .../springdoc/api/app152/HelloController.java | 30 - .../api/app152/SpringDocApp152Test.java | 34 - .../org/springdoc/api/app153/OrderState.java | 20 - .../api/app153/OrderStateMapper.java | 19 - .../api/app153/SpringDocApp153Test.java | 34 - .../springdoc/api/app153/TestController.java | 22 - .../api/app154/SpringDocApp154Test.java | 34 - .../app155/AbstractIntParameterObject.java | 24 - .../api/app155/AbstractParameterObject.java | 28 - .../springdoc/api/app155/ConcreteEnum.java | 9 - .../app155/ConcreteIntParameterObject.java | 14 - .../api/app155/ConcreteParameterObject.java | 14 - .../api/app155/SpringDocApp155Test.java | 34 - .../org/springdoc/api/app156/SomeEnum.java | 6 - .../api/app156/SpringDocApp156Test.java | 34 - .../test/org/springdoc/api/app156/User.java | 33 - .../test/org/springdoc/api/app157/Bar.java | 12 - .../test/org/springdoc/api/app157/Foo.java | 12 - .../springdoc/api/app157/HelloController.java | 44 - .../api/app157/StringyConverter.java | 25 - .../api/app158/CommonFooErrorHandler.java | 14 - .../org/springdoc/api/app158/ErrorDTO.java | 20 - .../springdoc/api/app158/HelloController.java | 38 - .../org/springdoc/api/app158/SimpleDTO.java | 22 - .../api/app158/SpecificFooErrorHandler.java | 7 - .../api/app158/SpringDocApp158Test.java | 12 - .../springdoc/api/app159/CustomException.java | 7 - .../org/springdoc/api/app159/FooBean.java | 31 - .../springdoc/api/app159/HelloController.java | 22 - .../api/app159/SpringDocApp159Test.java | 12 - .../test/org/springdoc/api/app159/Views.java | 8 - .../springdoc/api/app16/HelloController.java | 32 - .../api/app16/SpringDocApp16Test.java | 42 - .../api/app160/SpringDocApp160Test.java | 31 - .../api/app161/SpringDocApp161Test.java | 21 - .../springdoc/api/app162/OpenApiConfig.java | 24 - .../api/app162/SpringDocApp162Test.java | 18 - .../app163/ExampleRegistrationCustomizer.java | 25 - .../api/app163/SpringDocApp163Test.java | 34 - .../api/app164/SpringDocApp164Test.java | 33 - .../api/app164/TestApiController.java | 14 - .../api/app165/SpringDocApp165Test.java | 13 - .../api/app166/GlobalErrorResponseDto.java | 18 - .../api/app166/GlobalExceptionHandler.java | 17 - .../api/app166/LocalErrorResponseDto.java | 18 - .../api/app166/SpringDocApp166Test.java | 37 - .../api/app166/TestApiController.java | 23 - .../springdoc/api/app167/HelloController.java | 23 - .../api/app167/SpringDocApp167Test.java | 34 - .../api/app168/SpringDocApp168Test.java | 28 - .../app169/DefaultWebMvcRegistrations.java | 15 - .../api/app169/SpringDocApp169Test.java | 13 - .../springdoc/api/app169/TestController.java | 13 - .../springdoc/api/app17/HelloController.java | 36 - .../api/app17/SpringDocApp17Test.java | 29 - .../springdoc/api/app170/HelloController.java | 12 - .../api/app170/SpringDocApp170Test.java | 26 - .../api/app171/HelloLocaleController.java | 42 - .../springdoc/api/app172/HelloController.java | 33 - .../springdoc/api/app173/HelloController.java | 13 - .../org/springdoc/api/app174/PersonDTO.java | 60 - .../org/springdoc/api/app175/PersonDTO.java | 60 - .../org/springdoc/api/app176/PersonDTO.java | 63 - .../springdoc/api/app179/HelloController.java | 13 - .../springdoc/api/app179/MyConfiguration.java | 15 - .../api/app179/MyIdPathVariable.java | 11 - .../test/org/springdoc/api/app179/MyObj.java | 19 - .../api/app179/MyPathParameterCustomizer.java | 23 - .../api/app179/SpringDocApp179Test.java | 11 - .../api/app18/SpringDocApp18Test.java | 31 - .../springdoc/api/app180/MapExclusion.java | 8 - .../api/app181/AbstractParameterObject.java | 24 - .../api/app181/ConcreteParameterObject.java | 14 - .../springdoc/api/app181/HelloController.java | 38 - .../api/app181/SpringDocApp181Test.java | 34 - .../api/app182/SpringDocApp182Test.java | 33 - .../springdoc/api/app183/HelloController.java | 25 - .../api/app183/SpringDocApp183Test.java | 29 - .../test/org/springdoc/api/app183/User.java | 41 - .../springdoc/api/app183/UserConverter.java | 14 - .../org/springdoc/api/app183/WebConfig.java | 15 - .../springdoc/api/app184/HelloController.java | 53 - .../test/org/springdoc/api/app185/Cat.java | 24 - .../test/org/springdoc/api/app185/Dog.java | 24 - .../test/org/springdoc/api/app185/Pet.java | 23 - .../springdoc/api/app185/PetController.java | 18 - .../api/app185/SpringDocApp185Test.java | 12 - .../api/app19/SpringDocApp19Test.java | 29 - .../api/app2/api/HomeController.java | 42 - .../api/app2/api/PetApiController.java | 44 - .../api/app2/api/PetApiDelegateImpl.java | 27 - .../api/app2/api/StoreApiController.java | 44 - .../api/app2/api/StoreApiDelegateImpl.java | 27 - .../api/app2/api/UserApiDelegateImpl.java | 27 - .../springdoc/api/app20/HelloController.java | 38 - .../api/app20/SpringDocApp20Test.java | 29 - .../api/app21/SpringDocApp21Test.java | 31 - .../springdoc/api/app22/HelloController.java | 36 - .../org/springdoc/api/app22/PersonDTO.java | 60 - .../api/app22/SpringDocApp22Test.java | 29 - .../api/app23/SpringDocApp23Test.java | 29 - .../api/app24/SpringDocApp24Test.java | 26 - .../api/app25/SpringDocApp25Test.java | 29 - .../test/org/springdoc/api/app26/Bar.java | 32 - .../test/org/springdoc/api/app26/Foo.java | 33 - .../springdoc/api/app26/HelloController.java | 32 - .../test/org/springdoc/api/app26/MyModel.java | 35 - .../api/app26/SpringDocApp26Test.java | 29 - .../test/org/springdoc/api/app27/Bar.java | 23 - .../test/org/springdoc/api/app27/Foo.java | 23 - .../springdoc/api/app27/HelloController.java | 41 - .../org/springdoc/api/app27/MyException.java | 28 - .../springdoc/api/app28/HelloController.java | 34 - .../api/app28/SpringDocApp28Test.java | 29 - .../api/app29/SpringDocApp29Test.java | 29 - .../org/springdoc/api/app29/TrackerData.java | 41 - .../springdoc/api/app30/HelloController.java | 34 - .../api/app30/SpringDocApp30Test.java | 29 - .../api/app31/SpringDocApp31Test.java | 29 - .../springdoc/api/app32/HelloController.java | 46 - .../api/app32/SpringDocApp32Test.java | 29 - .../springdoc/api/app33/HelloController.java | 36 - .../api/app33/SpringDocApp33Test.java | 29 - .../springdoc/api/app34/HelloController.java | 36 - .../api/app34/SpringDocApp34Test.java | 29 - .../api/app35/SpringDocApp35Test.java | 35 - .../springdoc/api/app36/HelloController.java | 32 - .../test/org/springdoc/api/app37/Bar.java | 23 - .../test/org/springdoc/api/app37/Car.java | 24 - .../test/org/springdoc/api/app37/Foo.java | 23 - .../test/org/springdoc/api/app37/Pet.java | 24 - .../api/app37/SpringDocApp37Test.java | 29 - .../springdoc/api/app38/HelloController.java | 35 - .../api/app38/SpringDocApp38Test.java | 29 - .../springdoc/api/app39/HelloController.java | 43 - .../api/app39/SpringDocApp39Test.java | 26 - .../springdoc/api/app4/HelloController.java | 33 - .../springdoc/api/app4/SpringDocApp4Test.java | 38 - .../org/springdoc/api/app4/TrackerData.java | 40 - .../springdoc/api/app40/HelloController.java | 34 - .../api/app40/SpringDocApp40Test.java | 29 - .../springdoc/api/app42/HelloController.java | 34 - .../api/app42/SpringDocApp42Test.java | 39 - .../test/org/springdoc/api/app42/TweetId.java | 31 - .../springdoc/api/app43/HelloController.java | 37 - .../api/app43/SpringDocApp43Test.java | 29 - .../springdoc/api/app45/OpenApiConfig.java | 30 - .../org/springdoc/api/app45/PersonDTO.java | 60 - .../api/app45/SpringDocApp45Test.java | 29 - .../api/app46/SpringDocApp46Test.java | 29 - .../springdoc/api/app47/HelloController.java | 38 - .../api/app47/SpringDocApp47Test.java | 29 - .../api/app48/AbstractHelloController.java | 42 - .../springdoc/api/app48/HelloController.java | 45 - .../api/app48/SpringDocApp48Test.java | 29 - .../springdoc/api/app49/HelloController.java | 41 - .../api/app49/SpringDocApp49Test.java | 26 - .../api/app5/CustomOpenAPIConfig.java | 35 - .../springdoc/api/app50/HelloController.java | 40 - .../api/app50/SpringDocApp50Test.java | 26 - .../api/app51/SpringDocApp51Test.java | 29 - .../api/app52/SpringDocApp52Test.java | 29 - .../api/app53/SpringDocApp53Test.java | 29 - .../org/springdoc/api/app54/MealParty.java | 32 - .../api/app54/SpringDocApp54Test.java | 29 - .../test/org/springdoc/api/app54/Views.java | 27 - .../api/app55/SpringDocApp55Test.java | 29 - .../springdoc/api/app56/HelloController.java | 32 - .../api/app56/SpringDocApp56Test.java | 29 - .../springdoc/api/app57/HelloController.java | 36 - .../api/app57/SpringDocApp57Test.java | 29 - .../api/app58/SpringDocApp58Test.java | 29 - .../org/springdoc/api/app59/HelloBody.java | 14 - .../springdoc/api/app59/HelloController.java | 41 - .../springdoc/api/app59/HelloController2.java | 42 - .../api/app59/SpringDocApp59Test.java | 29 - .../springdoc/api/app6/SpringDocApp6Test.java | 30 - .../org/springdoc/api/app60/QueryPaging.java | 36 - .../org/springdoc/api/app60/QuerySort.java | 32 - .../api/app60/SpringDocApp60Test.java | 29 - .../api/app61/SpringDocApp61Test.java | 29 - .../springdoc/api/app62/BaseController.java | 41 - .../api/app62/SpringDocApp62Test.java | 29 - .../springdoc/api/app62/TestController.java | 37 - .../springdoc/api/app63/HelloController.java | 38 - .../api/app63/SpringDocApp63Test.java | 34 - .../springdoc/api/app64/HelloController.java | 39 - .../api/app64/SpringDocApp64Test.java | 31 - .../springdoc/api/app65/HelloController.java | 39 - .../api/app65/SpringDocApp65Test.java | 29 - .../api/app66/DefaultHealthCheckApi.java | 40 - .../api/app66/SpringDocApp66Test.java | 29 - .../api/app66/UndocumentedClass.java | 26 - .../api/app67/SpringDocApp67Test.java | 29 - .../api/app68/CustomizedOperation.java | 27 - .../api/app68/api/HomeController.java | 42 - .../api/app68/api/pet/PetApiController.java | 44 - .../api/app68/api/pet/PetApiDelegateImpl.java | 27 - .../app68/api/store/StoreApiController.java | 44 - .../app68/api/store/StoreApiDelegateImpl.java | 27 - .../api/app68/api/user/UserApiController.java | 44 - .../app68/api/user/UserApiDelegateImpl.java | 27 - .../api/app68/api/user/UserClient.java | 19 - .../springdoc/api/app69/HelloController.java | 36 - .../org/springdoc/api/app69/PersonDTO.java | 60 - .../api/app69/SpringDocApp69Test.java | 29 - .../springdoc/api/app7/HelloController.java | 37 - .../springdoc/api/app7/SpringDocApp7Test.java | 30 - .../springdoc/api/app70/HelloController.java | 40 - .../api/app70/SpringDocApp70Test.java | 29 - .../app70/customizer/CustomizedOperation.java | 27 - .../app70/customizer/CustomizedParameter.java | 27 - .../app70/customizer/CustomizedProperty.java | 27 - .../app70/customizer/OperationCustomizer.java | 36 - .../app70/customizer/ParameterCustomizer.java | 36 - .../springdoc/api/app70/model/ApiType.java | 33 - .../test/org/springdoc/api/app71/Dog.java | 36 - .../springdoc/api/app71/HelloController.java | 32 - .../api/app71/SpringDocApp71Test.java | 29 - .../api/app73/SpringDocApp73Test.java | 29 - .../springdoc/api/app74/HelloController.java | 45 - .../api/app74/SpringDocApp74Test.java | 29 - .../org/springdoc/api/app75/PersonDTO.java | 60 - .../RestResponseEntityExceptionHandler.java | 40 - .../api/app75/SpringDocApp75Test.java | 30 - .../springdoc/api/app76/HelloController.java | 44 - .../api/app76/SpringDocApp76Test.java | 49 - .../api/app77/SpringDocApp77Test.java | 29 - .../springdoc/api/app78/HelloController.java | 42 - .../org/springdoc/api/app78/PersonDTO.java | 60 - .../api/app78/SpringDocApp78Test.java | 29 - .../springdoc/api/app79/HelloController.java | 36 - .../api/app79/SpringDocApp79Test.java | 30 - .../springdoc/api/app8/HelloController.java | 30 - .../springdoc/api/app8/SpringDocApp8Test.java | 41 - .../api/app80/SpringDocApp80Test.java | 31 - .../org/springdoc/api/app80/TestObject.java | 25 - .../springdoc/api/app81/HelloController.java | 33 - .../springdoc/api/app82/HelloController.java | 36 - .../org/springdoc/api/app82/PersonDTO.java | 60 - .../api/app82/SpringDocApp82Test.java | 30 - .../org/springdoc/api/app83/PersonDTO.java | 60 - .../api/app83/SpringDocApp83Test.java | 30 - .../springdoc/api/app84/HelloController.java | 39 - .../api/app84/SpringDocApp84Test.java | 30 - .../springdoc/api/app85/HelloController.java | 42 - .../api/app85/SpringDocApp85Test.java | 30 - .../springdoc/api/app86/HelloController.java | 38 - .../api/app86/SpringDocApp86Test.java | 33 - .../api/app86/test/HelloController2.java | 38 - .../springdoc/api/app87/HelloController.java | 50 - .../api/app87/SpringDocApp87Test.java | 30 - .../springdoc/api/app88/HelloController.java | 32 - .../api/app88/SpringDocApp88Test.java | 31 - .../springdoc/api/app89/HelloController.java | 37 - .../api/app89/SpringDocApp89Test.java | 40 - .../test/org/springdoc/api/app9/MyApi.java | 37 - .../springdoc/api/app9/MyApiController.java | 39 - .../springdoc/api/app9/SpringDocApp9Test.java | 30 - .../api/app90/SpringDocApp90Test.java | 26 - .../org/springdoc/api/app91/Greeting.java | 26 - .../api/app91/SpringDocApp91Test.java | 33 - .../springdoc/api/app92/HelloController.java | 36 - .../api/app92/ParameterCustomizer.java | 38 - .../api/app92/SpringDocApp92Test.java | 31 - .../springdoc/api/app93/BaseClientModel.java | 8 - .../springdoc/api/app93/BaseController.java | 13 - .../api/app93/SpecificClientModel.java | 8 - .../api/app93/SpecificController.java | 6 - .../api/app93/SpringDocApp93Test.java | 31 - .../springdoc/api/app95/HelloController.java | 21 - .../api/app95/SpringDocApp95Test.java | 33 - .../springdoc/api/app96/HelloController.java | 47 - .../api/app96/SpringDocApp96Test.java | 31 - .../springdoc/api/app97/HelloController.java | 43 - .../api/app97/SpringDocApp97Test.java | 31 - .../org/springdoc/api/app97/StudentV1.java | 13 - .../org/springdoc/api/app97/StudentV2.java | 13 - .../org/springdoc/api/app97/StudentV3.java | 13 - .../springdoc/api/app98/HelloController.java | 14 - .../api/app98/IgnoredAnnotationParameter.java | 27 - .../api/app98/SpringDocApp98Test.java | 35 - .../springdoc/api/app99/HelloController.java | 22 - .../api/app99/SpringDocApp99Test.java | 33 - .../v30/AbstractSpringDocActuatorV30Test.java | 51 + .../AbstractSpringDocV30Test.java} | 33 +- .../springdoc/api/v30/app1/ApiException.java | 37 + .../api/{ => v30}/app1/ApiOriginFilter.java | 28 +- .../{ => v30}/app1/ApiResponseMessage.java | 28 +- .../springdoc/api/v30/app1/ErrorMessage.java | 52 + .../{ => v30}/app1/ExceptionTranslator.java | 28 +- .../api/v30/app1/HelloController.java | 44 + .../api/v30/app1/HomeController.java | 46 + .../api/{ => v30}/app1/InventoryApi.java | 28 +- .../app1/InventoryApiController.java | 28 +- .../api/{ => v30}/app1/InventoryItem.java | 28 +- .../api/{ => v30}/app1/ItemController.java | 28 +- .../springdoc/api/{ => v30}/app1/ItemDTO.java | 28 +- .../api/{ => v30}/app1/ItemLightDTO.java | 28 +- .../api/{ => v30}/app1/Manufacturer.java | 28 +- .../api/{ => v30}/app1/PeopleRestService.java | 28 +- .../org/springdoc/api/v30/app1/PersonDTO.java | 64 + .../api/{ => v30}/app1/SpringDocApp1Test.java | 32 +- .../api/{ => v30}/app10/HelloController.java | 28 +- .../api/v30/app10/SpringDocApp10Test.java | 33 + .../api/v30/app100/HelloController.java | 43 + .../springdoc/api/v30/app100/PersonDTO.java | 67 + .../api/v30/app100/SpringDocApp100Test.java | 35 + .../api/v30/app101/HelloController.java | 45 + .../springdoc/api/v30/app101/HelloDTO.java | 43 + .../api/v30/app101/SpringDocApp101Test.java | 37 + .../v30/app102/InheritedRequestParams.java | 41 + .../api/{ => v30}/app102/RequestParams.java | 24 +- .../api/v30/app102/SpringDocApp102Test.java | 32 + .../api/v30/app102/TestController.java | 37 + .../springdoc/api/v30/app103/ExampleBody.java | 45 + .../api/{ => v30}/app103/HelloController.java | 28 +- .../api/v30/app103/SpringDocApp103Test.java | 32 + .../api/v30/app104/CrudController.java | 53 + .../org/springdoc/api/v30/app104/Design.java | 26 + .../api/v30/app104/DesignController.java | 36 + .../springdoc/api/v30/app104/HavingPK.java | 26 + .../api/v30/app104/SpringDocApp104Test.java | 32 + .../{ => v30}/app105/SpringDocApp105Test.java | 44 +- .../springdoc/api/v30/app105/api/ApiUtil.java | 50 + .../v30/app105/api/ExceptionTranslator.java | 53 + .../api/v30/app105/api/HomeController.java | 46 + .../api/{ => v30}/app105/api/pet/PetApi.java | 32 +- .../v30/app105/api/pet/PetApiController.java | 48 + .../v30/app105/api/pet/PetApiDelegate.java | 146 +++ .../app105/api/pet/PetApiDelegateImpl.java | 31 + .../{ => v30}/app105/api/store/StoreApi.java | 30 +- .../app105/api/store/StoreApiController.java | 48 + .../app105/api/store/StoreApiDelegate.java | 97 ++ .../api/store/StoreApiDelegateImpl.java | 31 + .../api/v30/app105/api/user/UserApi.java | 137 ++ .../app105/api/user/UserApiController.java | 48 + .../v30/app105/api/user/UserApiDelegate.java | 126 ++ .../app105/api/user/UserApiDelegateImpl.java | 31 + .../springdoc/api/v30/app105/model/Body.java | 101 ++ .../springdoc/api/v30/app105/model/Body1.java | 103 ++ .../api/v30/app105/model/Category.java | 95 ++ .../v30/app105/model/ModelApiResponse.java | 118 ++ .../springdoc/api/v30/app105/model/Order.java | 230 ++++ .../springdoc/api/v30/app105/model/Pet.java | 245 ++++ .../springdoc/api/v30/app105/model/Tag.java | 95 ++ .../springdoc/api/v30/app105/model/User.java | 236 ++++ .../api/{ => v30}/app106/HelloController.java | 24 +- .../api/v30/app106/SpringDocApp106Test.java | 32 + .../api/v30/app107/HelloController.java | 58 + .../api/v30/app107/SpringDocApp107Test.java | 32 + .../api/{ => v30}/app108/ActionResult.java | 24 +- .../api/v30/app108/HelloController.java | 36 + .../api/v30/app108/SpringDocApp108Test.java | 32 + .../api/v30/app109/HelloController.java | 47 + .../api/v30/app109/SpringDocApp109Test.java | 32 + .../api/{ => v30}/app11/HelloController.java | 28 +- .../api/v30/app11/SpringDocApp11Test.java | 34 + .../api/v30/app110/ErrorMessage.java | 56 + .../app110/GlobalControllerAdvice.java | 24 +- .../api/{app111 => v30/app110}/Person.java | 24 +- .../app110}/PersonController.java | 24 +- .../app110}/PersonController2.java | 26 +- .../org/springdoc/api/v30/app110/Problem.java | 57 + .../{ => v30}/app110/SpringDocApp110Test.java | 28 +- .../api/v30/app111/ErrorMessage.java | 56 + .../app111}/GlobalControllerAdvice.java | 26 +- .../api/{app112 => v30/app111}/Person.java | 24 +- .../app111}/PersonController.java | 24 +- .../{ => v30}/app111/PersonController2.java | 24 +- .../org/springdoc/api/v30/app111/Problem.java | 57 + .../{ => v30}/app111/SpringDocApp111Test.java | 28 +- .../api/v30/app112/ErrorMessage.java | 56 + .../app112}/GlobalControllerAdvice.java | 26 +- .../api/{app110 => v30/app112}/Person.java | 24 +- .../app112}/PersonController.java | 24 +- .../org/springdoc/api/v30/app112/Problem.java | 57 + .../{ => v30}/app112/SpringDocApp112Test.java | 28 +- .../app112/sample}/PersonController2.java | 26 +- .../api/v30/app113/HelloController.java | 45 + .../api/v30/app113/SpringDocApp113Test.java | 34 + .../api/v30/app114/HelloController.java | 47 + .../api/v30/app114/SpringDocApp114Test.java | 41 + .../api/v30/app115/HelloController.java | 41 + .../app115/JavaTimeOperationCustomizer.java | 24 +- .../api/v30/app115/SpringDocApp115Test.java | 35 + .../api/v30/app116/FooErrorHandler.java | 37 + .../api/v30/app116/HelloController.java | 45 + .../api/v30/app116/SpringDocApp116Test.java | 35 + .../{ => v30}/app117/HelloApplication.java | 24 +- .../api/v30/app117/SpringDocApp117Test.java | 34 + .../app118}/AbstractParent.java | 24 +- .../api/{ => v30}/app118/ConcreteParent.java | 116 +- .../api/{ => v30}/app118/Controller.java | 110 +- .../api/v30/app118/SpringDocApp118Test.java | 34 + .../api/{ => v30}/app119/HelloController.java | 28 +- .../springdoc/api/v30/app119/JsonRequest.java | 36 + .../api/v30/app119/SpringDocApp119Test.java | 34 + .../api/v30/app12/HelloController.java | 43 + .../api/v30/app12/SpringDocApp12Test.java | 33 + .../api/{ => v30}/app120/AccountId.java | 28 +- .../app120/MetaAnnotationController.java | 28 +- .../api/v30/app120/SpringDocApp120Test.java | 36 + .../v30/app121/InheritedRequestParams.java | 42 + .../api/{ => v30}/app121/RequestParams.java | 24 +- .../{ => v30}/app121/SpringDocApp121Test.java | 9 +- .../api/v30/app121/TestController.java | 38 + .../api/{ => v30}/app122/BaseController.java | 5 +- .../api/{ => v30}/app122/BaseObject.java | 5 +- .../api/{ => v30}/app122/CustomerDto.java | 5 +- .../api/{ => v30}/app122/FirstController.java | 5 +- .../{ => v30}/app122/SpringDocApp122Test.java | 9 +- .../api/{ => v30}/app122/Wrapper.java | 5 +- .../api/v30/app123/HelloController.java | 40 + .../{ => v30}/app123/MyExceptionHandler.java | 28 +- .../{ => v30}/app123/SpringDocApp123Test.java | 9 +- .../api/{ => v30}/app124/HelloController.java | 28 +- .../api/v30/app124/MyExceptionHandler.java | 38 + .../{ => v30}/app124/SpringDocApp124Test.java | 9 +- .../api/v30/app125/DeprecatedEntity.java | 57 + .../api/v30/app125/HelloController.java | 47 + .../{ => v30}/app125/SpringDocApp125Test.java | 9 +- .../api/{ => v30}/app126/HelloController.java | 28 +- .../api/{ => v30}/app126/Problem.java | 24 +- ...SecurityProblemResponsesConfiguration.java | 24 +- .../{ => v30}/app126/SpringDocApp126Test.java | 9 +- .../api/v30/app127/AbstractObject.java | 53 + .../api/v30/app127/ConcreteObjectA.java | 37 + .../api/v30/app127/ConcreteType.java | 38 + .../api/{ => v30}/app127/Controller.java | 24 +- .../{ => v30}/app127/SpringDocApp127Test.java | 9 +- .../springdoc/api/v30/app127/Umbrella.java | 39 + .../api/v30/app128/HelloController.java | 39 + .../{ => v30}/app128/SpringDocApp128Test.java | 9 +- .../api/v30/app129/ActualReturnedEntity.java | 32 + .../api/{ => v30}/app129/HelloController.java | 28 +- .../api/v30/app129/OperationResponse.java | 31 + .../{ => v30}/app129/SpringDocApp129Test.java | 9 +- .../api/v30/app13/HelloController.java | 36 + .../springdoc/api/v30/app13/PersonDTO.java | 64 + .../api/v30/app13/SpringDocApp13Test.java | 33 + .../api/v30/app130/HelloController.java | 41 + .../{ => v30}/app130/SpringDocApp130Test.java | 9 +- .../springdoc/api/v30/app130/TrackerData.java | 45 + .../api/{ => v30}/app131/HelloController.java | 28 +- .../api/{ => v30}/app131/Organization.java | 24 +- .../api/v30/app131/RestControllerError.java | 35 + .../{ => v30}/app131/SpringDocApp131Test.java | 9 +- .../api/{ => v30}/app132/HelloController.java | 28 +- .../api/{ => v30}/app132/Organization.java | 24 +- .../api/v30/app132/RestControllerError.java | 35 + .../{ => v30}/app132/SpringDocApp132Test.java | 9 +- .../api/{ => v30}/app133/HelloController.java | 28 +- .../{ => v30}/app133/SpringDocApp133Test.java | 9 +- .../api/{ => v30}/app134/HelloController.java | 28 +- .../api/{ => v30}/app134/OpenApiConfig.java | 24 +- .../{ => v30}/app134/SpringDocApp134Test.java | 19 +- .../api/{app141 => v30/app135}/Book.java | 5 +- .../app135}/BookRepository.java | 5 +- .../api/{ => v30}/app135/BookRouter.java | 26 +- .../{ => v30}/app135/SpringDocApp135Test.java | 9 +- .../app136/OperationIdController.java | 28 +- .../{ => v30}/app136/SpringDocApp136Test.java | 7 +- .../api/v30/app137/HelloController.java | 37 + .../api/{ => v30}/app137/OpenApiConfig.java | 28 +- .../{ => v30}/app137/SpringDocApp137Test.java | 9 +- .../api/v30/app138/HelloController.java | 38 + .../{ => v30}/app138/SpringDocApp138Test.java | 21 +- .../api/v30/app139/HelloController.java | 43 + .../{ => v30}/app139/SpringDocApp139Test.java | 9 +- .../api/v30/app14/HelloController.java | 48 + .../api/v30/app14/SpringDocApp14Test.java | 33 + .../{ => v30}/app140/HelloApplication.java | 5 +- .../{ => v30}/app140/SpringDocApp140Test.java | 9 +- .../org/springdoc/api/v30/app141/Book.java | 60 + .../api/v30/app141/BookRepository.java | 41 + .../api/{ => v30}/app141/BookRouter.java | 5 +- .../{ => v30}/app141/SpringDocApp141Test.java | 9 +- .../{ => v30}/app142/HelloApplication.java | 5 +- .../{ => v30}/app142/SpringDocApp142Test.java | 9 +- .../api/v30/app143/HelloHiddenController.java | 41 + .../api/v30/app143/SpringDocApp143Test.java | 42 + .../api/v30/app144/HelloController.java | 36 + .../{ => v30}/app144/SpringDocApp144Test.java | 34 +- .../api/v30/app145/HelloController.java | 36 + .../{ => v30}/app145/SpringDocApp145Test.java | 36 +- .../api/v30/app146/HelloController.java | 36 + .../{ => v30}/app146/SpringDocApp146Test.java | 36 +- .../api/v30/app147/HelloController.java | 47 + .../{ => v30}/app147/SpringDocApp147Test.java | 36 +- .../api/v30/app148/HelloController.java | 47 + .../{ => v30}/app148/SpringDocApp148Test.java | 36 +- .../api/{ => v30}/app149/HelloController.java | 28 +- .../api/v30/app149/HelloMessage.java | 33 + .../api/v30/app149/HiddenHelloController.java | 44 + .../api/v30/app149/SpringDocApp149Test.java | 42 + .../api/v30/app15/HelloController.java | 43 + .../{ => v30}/app15/SpringDocApp15Test.java | 32 +- .../api/{ => v30}/app150/HelloController.java | 28 +- .../api/v30/app150/SpringDocApp150Test.java | 38 + .../api/v30/app151/HelloController.java | 41 + .../api/v30/app151/SpringDocApp151Test.java | 38 + .../api/v30/app152/HelloController.java | 52 + .../api/v30/app152/SpringDocApp152Test.java | 38 + .../springdoc/api/v30/app153/OrderState.java | 42 + .../api/v30/app153/OrderStateMapper.java | 41 + .../api/v30/app153/SpringDocApp153Test.java | 38 + .../api/v30/app153/TestController.java | 44 + .../api/{ => v30}/app154/HelloController.java | 28 +- .../app154/OpenApiConfiguration.java | 24 +- .../api/v30/app154/SpringDocApp154Test.java | 38 + .../app155/AbstractIntParameterObject.java | 46 + .../v30/app155/AbstractParameterObject.java | 50 + .../api/v30/app155/ConcreteEnum.java | 31 + .../app155/ConcreteIntParameterObject.java | 36 + .../v30/app155/ConcreteParameterObject.java | 36 + .../api/{ => v30}/app155/HelloController.java | 28 +- .../api/v30/app155/SpringDocApp155Test.java | 38 + .../api/{ => v30}/app156/HelloController.java | 24 +- .../springdoc/api/v30/app156/SomeEnum.java | 28 + .../api/v30/app156/SpringDocApp156Test.java | 38 + .../org/springdoc/api/v30/app156/User.java | 55 + .../org/springdoc/api/v30/app157/Bar.java | 34 + .../org/springdoc/api/v30/app157/Foo.java | 34 + .../api/v30/app157/HelloController.java | 48 + .../{ => v30}/app157/SpringDocApp157Test.java | 40 +- .../api/v30/app157/StringyConverter.java | 59 + .../api/v30/app158/CommonFooErrorHandler.java | 36 + .../springdoc/api/v30/app158/ErrorDTO.java | 42 + .../api/v30/app158/HelloController.java | 42 + .../springdoc/api/v30/app158/SimpleDTO.java | 44 + .../v30/app158/SpecificFooErrorHandler.java | 29 + .../api/v30/app158/SpringDocApp158Test.java | 34 + .../api/v30/app159/CustomException.java | 29 + .../org/springdoc/api/v30/app159/FooBean.java | 53 + .../api/{ => v30}/app159/FooErrorHandler.java | 24 +- .../api/v30/app159/HelloController.java | 44 + .../api/v30/app159/SpringDocApp159Test.java | 34 + .../org/springdoc/api/v30/app159/Views.java | 30 + .../api/v30/app16/HelloController.java | 36 + .../api/v30/app16/SpringDocApp16Test.java | 46 + .../api/{ => v30}/app160/HelloController.java | 28 +- .../api/v30/app160/SpringDocApp160Test.java | 53 + .../api/{ => v30}/app161/HelloController.java | 28 +- .../api/v30/app161/SpringDocApp161Test.java | 43 + .../api/v30/app162/OpenApiConfig.java | 46 + .../api/v30/app162/SpringDocApp162Test.java | 40 + .../api/{ => v30}/app163/CommissionDto.java | 28 +- .../{ => v30}/app163/CommissionsResource.java | 34 +- .../app163/ExampleRegistrationCustomizer.java | 47 + .../api/{ => v30}/app163/Examples.java | 28 +- .../api/v30/app163/SpringDocApp163Test.java | 38 + .../{ => v30}/app164/SampleResponseClass.java | 24 +- .../api/v30/app164/SpringDocApp164Test.java | 37 + .../api/v30/app164/TestApiController.java | 36 + .../api/{ => v30}/app165/HelloController.java | 24 +- .../api/v30/app165/SpringDocApp165Test.java | 35 + .../v30/app166/GlobalErrorResponseDto.java | 40 + .../v30/app166/GlobalExceptionHandler.java | 39 + .../api/v30/app166/LocalErrorResponseDto.java | 40 + .../api/v30/app166/SpringDocApp166Test.java | 41 + .../api/v30/app166/TestApiController.java | 45 + .../api/v30/app167/HelloController.java | 45 + .../api/v30/app167/SpringDocApp167Test.java | 38 + .../app168}/AbstractParent.java | 116 +- .../api/{ => v30}/app168/ConcreteParent.java | 24 +- .../api/{ => v30}/app168/Controller.java | 24 +- .../api/v30/app168/SpringDocApp168Test.java | 50 + .../DefaultRequestMappingHandlerMapping.java | 24 +- .../app169/DefaultWebMvcRegistrations.java | 37 + .../api/v30/app169/SpringDocApp169Test.java | 35 + .../api/v30/app169/TestController.java | 35 + .../api/v30/app17/HelloController.java | 40 + .../api/v30/app17/SpringDocApp17Test.java | 33 + .../api/v30/app170/HelloController.java | 34 + .../api/v30/app170/SpringDocApp170Test.java | 48 + .../api/v30/app171/HelloLocaleController.java | 46 + .../{ => v30}/app171/SpringDocApp171Test.java | 34 +- .../api/v30/app172/HelloController.java | 37 + .../{ => v30}/app172/SpringDocApp172Test.java | 36 +- .../api/v30/app173/HelloController.java | 35 + .../{ => v30}/app173/SpringDocApp173Test.java | 34 +- .../springdoc/api/v30/app174/PersonDTO.java | 64 + .../{ => v30}/app174/SpringDocApp174Test.java | 42 +- .../springdoc/api/v30/app175/PersonDTO.java | 64 + .../{ => v30}/app175/SpringDocApp175Test.java | 32 +- .../api/{ => v30}/app176/HelloController.java | 30 +- .../springdoc/api/v30/app176/PersonDTO.java | 67 + .../{ => v30}/app176/SpringDocApp176Test.java | 9 +- .../{ => v30}/app177/AnnotatedController.java | 24 +- .../{ => v30}/app177/SpringDocApp177Test.java | 15 +- .../{ => v30}/app178/AnnotatedController.java | 24 +- .../{ => v30}/app178/SpringDocApp178Test.java | 15 +- .../api/v30/app179/HelloController.java | 35 + .../api/v30/app179/MyConfiguration.java | 37 + .../api/v30/app179/MyIdPathVariable.java | 33 + .../org/springdoc/api/v30/app179/MyObj.java | 41 + .../app179/MyObjArgumentResolver.java | 24 +- .../v30/app179/MyPathParameterCustomizer.java | 45 + .../api/v30/app179/SpringDocApp179Test.java | 33 + .../api/{ => v30}/app18/HelloController.java | 28 +- .../api/v30/app18/SpringDocApp18Test.java | 35 + .../springdoc/api/{ => v30}/app180/Body.java | 24 +- .../api/v30/app180/MapExclusion.java | 30 + .../api/{ => v30}/app180/RESTService.java | 24 +- .../{ => v30}/app180/SpringDocApp180Test.java | 9 +- .../v30/app181/AbstractParameterObject.java | 46 + .../v30/app181/ConcreteParameterObject.java | 36 + .../api/v30/app181/HelloController.java | 42 + .../api/v30/app181/SpringDocApp181Test.java | 38 + .../api/{ => v30}/app182/HelloController.java | 28 +- .../api/v30/app182/SpringDocApp182Test.java | 37 + .../api/v30/app183/HelloController.java | 47 + .../api/v30/app183/SpringDocApp183Test.java | 33 + .../org/springdoc/api/v30/app183/User.java | 63 + .../api/v30/app183/UserConverter.java | 36 + .../springdoc/api/v30/app183/WebConfig.java | 37 + .../api/v30/app184/HelloController.java | 57 + .../{ => v30}/app184/SpringDocApp184Test.java | 38 +- .../org/springdoc/api/v30/app185/Cat.java | 46 + .../org/springdoc/api/v30/app185/Dog.java | 46 + .../org/springdoc/api/v30/app185/Pet.java | 45 + .../api/v30/app185/PetController.java | 40 + .../api/v30/app185/SpringDocApp185Test.java | 34 + .../api/{ => v30}/app19/HelloController.java | 28 +- .../api/v30/app19/SpringDocApp19Test.java | 33 + .../api/{ => v30}/app2/SpringDocApp2Test.java | 32 +- .../api/{app105 => v30/app2}/api/ApiUtil.java | 28 +- .../app2}/api/ExceptionTranslator.java | 28 +- .../api/v30/app2/api/HomeController.java | 46 + .../api/{ => v30}/app2/api/PetApi.java | 32 +- .../api/v30/app2/api/PetApiController.java | 48 + .../pet => v30/app2/api}/PetApiDelegate.java | 33 +- .../api/v30/app2/api/PetApiDelegateImpl.java | 31 + .../api/{ => v30}/app2/api/StoreApi.java | 30 +- .../api/v30/app2/api/StoreApiController.java | 48 + .../{ => v30}/app2/api/StoreApiDelegate.java | 30 +- .../v30/app2/api/StoreApiDelegateImpl.java | 31 + .../api/user => v30/app2/api}/UserApi.java | 30 +- .../{ => v30}/app2/api/UserApiController.java | 28 +- .../app2/api}/UserApiDelegate.java | 31 +- .../api/v30/app2/api/UserApiDelegateImpl.java | 31 + .../api/{ => v30}/app2/model/Body.java | 28 +- .../api/{ => v30}/app2/model/Body1.java | 28 +- .../api/{ => v30}/app2/model/Category.java | 28 +- .../app2/model/ModelApiResponse.java | 28 +- .../api/{ => v30}/app2/model/Order.java | 28 +- .../api/{ => v30}/app2/model/Pet.java | 28 +- .../api/{ => v30}/app2/model/Tag.java | 28 +- .../api/{ => v30}/app2/model/User.java | 28 +- .../api/v30/app20/HelloController.java | 42 + .../api/v30/app20/SpringDocApp20Test.java | 33 + .../api/{ => v30}/app21/HelloController.java | 28 +- .../api/v30/app21/SpringDocApp21Test.java | 35 + .../api/v30/app22/HelloController.java | 40 + .../springdoc/api/v30/app22/PersonDTO.java | 64 + .../api/v30/app22/SpringDocApp22Test.java | 33 + .../api/{ => v30}/app23/HelloController.java | 28 +- .../api/v30/app23/SpringDocApp23Test.java | 33 + .../api/{ => v30}/app24/HelloController.java | 28 +- .../api/v30/app24/SpringDocApp24Test.java | 30 + .../api/{ => v30}/app24/SpringDocTestApp.java | 28 +- .../api/{ => v30}/app25/HelloController.java | 28 +- .../api/v30/app25/SpringDocApp25Test.java | 33 + .../test/org/springdoc/api/v30/app26/Bar.java | 36 + .../test/org/springdoc/api/v30/app26/Foo.java | 37 + .../api/v30/app26/HelloController.java | 36 + .../org/springdoc/api/v30/app26/MyModel.java | 39 + .../api/v30/app26/SpringDocApp26Test.java | 33 + .../springdoc/api/{ => v30}/app27/Advice.java | 28 +- .../test/org/springdoc/api/v30/app27/Bar.java | 27 + .../test/org/springdoc/api/v30/app27/Foo.java | 27 + .../api/v30/app27/HelloController.java | 45 + .../springdoc/api/v30/app27/MyException.java | 32 + .../{ => v30}/app27/SpringDocApp27Test.java | 32 +- .../api/v30/app28/HelloController.java | 38 + .../api/v30/app28/SpringDocApp28Test.java | 33 + .../api/{ => v30}/app29/HelloController.java | 28 +- .../api/v30/app29/SpringDocApp29Test.java | 33 + .../springdoc/api/v30/app29/TrackerData.java | 45 + .../api/v30/app30/HelloController.java | 38 + .../api/v30/app30/SpringDocApp30Test.java | 33 + .../api/{ => v30}/app31/HelloController.java | 28 +- .../api/v30/app31/SpringDocApp31Test.java | 33 + .../api/v30/app32/HelloController.java | 50 + .../api/v30/app32/SpringDocApp32Test.java | 33 + .../api/v30/app33/HelloController.java | 40 + .../api/v30/app33/SpringDocApp33Test.java | 33 + .../api/v30/app34/HelloController.java | 40 + .../{ => v30}/app34/MyExceptionHandler.java | 28 +- .../api/v30/app34/SpringDocApp34Test.java | 33 + .../api/{ => v30}/app35/HelloController.java | 28 +- .../api/v30/app35/SpringDocApp35Test.java | 39 + .../api/v30/app36/HelloController.java | 36 + .../{ => v30}/app36/SpringDocApp36Test.java | 32 +- .../test/org/springdoc/api/v30/app37/Bar.java | 27 + .../test/org/springdoc/api/v30/app37/Car.java | 28 + .../test/org/springdoc/api/v30/app37/Foo.java | 27 + .../api/{ => v30}/app37/HelloController.java | 28 +- .../test/org/springdoc/api/v30/app37/Pet.java | 28 + .../api/v30/app37/SpringDocApp37Test.java | 33 + .../api/v30/app38/HelloController.java | 39 + .../api/v30/app38/SpringDocApp38Test.java | 33 + .../api/v30/app39/HelloController.java | 47 + .../api/v30/app39/SpringDocApp39Test.java | 30 + .../api/{ => v30}/app39/SpringDocTestApp.java | 28 +- .../api/v30/app4/HelloController.java | 37 + .../api/v30/app4/SpringDocApp4Test.java | 42 + .../springdoc/api/v30/app4/TrackerData.java | 44 + .../api/v30/app40/HelloController.java | 38 + .../api/v30/app40/SpringDocApp40Test.java | 33 + .../api/{ => v30}/app41/HelloController.java | 28 +- .../{ => v30}/app41/SpringDocApp411Test.java | 34 +- .../{ => v30}/app41/SpringDocApp41Test.java | 34 +- .../api/v30/app42/HelloController.java | 38 + .../api/v30/app42/SpringDocApp42Test.java | 43 + .../org/springdoc/api/v30/app42/TweetId.java | 35 + .../api/v30/app43/HelloController.java | 41 + .../api/v30/app43/SpringDocApp43Test.java | 33 + .../api/{ => v30}/app44/HelloController.java | 28 +- .../{ => v30}/app44/SpringDocApp44Test.java | 32 +- .../api/{ => v30}/app45/HelloController.java | 28 +- .../api/{ => v30}/app45/HelloController2.java | 28 +- .../api/v30/app45/OpenApiConfig.java | 34 + .../springdoc/api/v30/app45/PersonDTO.java | 64 + .../api/v30/app45/SpringDocApp45Test.java | 33 + .../api/{ => v30}/app46/HelloController.java | 28 +- .../api/v30/app46/SpringDocApp46Test.java | 33 + .../api/v30/app47/HelloController.java | 42 + .../api/v30/app47/SpringDocApp47Test.java | 33 + .../v30/app48/AbstractHelloController.java | 46 + .../api/v30/app48/HelloController.java | 49 + .../api/v30/app48/SpringDocApp48Test.java | 33 + .../api/v30/app49/HelloController.java | 45 + .../api/v30/app49/SpringDocApp49Test.java | 30 + .../api/{ => v30}/app49/SpringDocTestApp.java | 28 +- .../api/v30/app5/CustomOpenAPIConfig.java | 39 + ...gurationComponentsSecuritySchemesTest.java | 32 +- ...penApiResourceCustomConfigurationTest.java | 34 +- .../OpenApiResourceNoConfigurationTest.java | 32 +- .../api/v30/app50/HelloController.java | 44 + .../api/v30/app50/SpringDocApp50Test.java | 30 + .../api/{ => v30}/app50/SpringDocTestApp.java | 28 +- .../api/{ => v30}/app51/HelloController.java | 28 +- .../api/v30/app51/SpringDocApp51Test.java | 33 + .../api/{ => v30}/app52/HelloController.java | 28 +- .../api/v30/app52/SpringDocApp52Test.java | 33 + .../api/{ => v30}/app53/HelloController.java | 28 +- .../HelloControllerWithGlobalApiResponse.java | 28 +- .../api/v30/app53/SpringDocApp53Test.java | 33 + .../api/{ => v30}/app54/HelloController.java | 28 +- .../springdoc/api/v30/app54/MealParty.java | 36 + .../api/v30/app54/SpringDocApp54Test.java | 33 + .../org/springdoc/api/v30/app54/Views.java | 31 + .../api/{ => v30}/app55/HelloController.java | 28 +- .../api/v30/app55/SpringDocApp55Test.java | 33 + .../app56/GlobalExceptionHandler.java | 28 +- .../api/v30/app56/HelloController.java | 36 + .../api/v30/app56/SpringDocApp56Test.java | 33 + .../api/v30/app57/HelloController.java | 40 + .../api/v30/app57/SpringDocApp57Test.java | 33 + .../api/{ => v30}/app58/HelloController.java | 28 +- .../api/v30/app58/SpringDocApp58Test.java | 33 + .../springdoc/api/v30/app59/HelloBody.java | 36 + .../api/v30/app59/HelloController.java | 45 + .../api/v30/app59/HelloController2.java | 46 + .../app59/HelloExceptionHandler.java | 24 +- .../api/v30/app59/SpringDocApp59Test.java | 33 + .../api/{ => v30}/app6/HelloController.java | 28 +- .../api/v30/app6/SpringDocApp6Test.java | 34 + .../api/{ => v30}/app60/HelloController.java | 28 +- .../springdoc/api/v30/app60/QueryPaging.java | 40 + .../springdoc/api/v30/app60/QuerySort.java | 36 + .../api/v30/app60/SpringDocApp60Test.java | 33 + .../api/{ => v30}/app61/HelloController.java | 28 +- .../api/v30/app61/SpringDocApp61Test.java | 33 + .../api/v30/app62/BaseController.java | 45 + .../api/v30/app62/SpringDocApp62Test.java | 33 + .../api/v30/app62/TestController.java | 41 + .../api/v30/app63/HelloController.java | 42 + .../api/v30/app63/SpringDocApp63Test.java | 38 + .../api/v30/app64/HelloController.java | 43 + .../api/v30/app64/SpringDocApp64Test.java | 35 + .../api/v30/app65/HelloController.java | 43 + .../api/v30/app65/SpringDocApp65Test.java | 33 + .../api/v30/app66/DefaultHealthCheckApi.java | 44 + .../api/{ => v30}/app66/HelloController.java | 28 +- .../api/v30/app66/SpringDocApp66Test.java | 33 + .../api/v30/app66/UndocumentedClass.java | 30 + .../api/{ => v30}/app67/HelloController.java | 28 +- .../api/v30/app67/SpringDocApp67Test.java | 33 + .../api/v30/app68/CustomizedOperation.java | 31 + .../{ => v30}/app68/SpringDocApp68Test.java | 40 +- .../api/{ => v30}/app68/SpringDocTestApp.java | 32 +- .../api/{ => v30}/app68/api/ApiUtil.java | 28 +- .../app68/api/ExceptionTranslator.java | 28 +- .../api/v30/app68/api/HomeController.java | 46 + .../api/v30/app68/api/pet/PetApi.java | 166 +++ .../v30/app68/api/pet/PetApiController.java | 48 + .../app68/api/pet}/PetApiDelegate.java | 33 +- .../v30/app68/api/pet/PetApiDelegateImpl.java | 31 + .../{ => v30}/app68/api/store/StoreApi.java | 30 +- .../app68/api/store/StoreApiController.java | 48 + .../app68}/api/store/StoreApiDelegate.java | 32 +- .../app68/api/store/StoreApiDelegateImpl.java | 31 + .../api => v30/app68/api/user}/UserApi.java | 30 +- .../v30/app68/api/user/UserApiController.java | 48 + .../app68/api/user}/UserApiDelegate.java | 31 +- .../app68/api/user/UserApiDelegateImpl.java | 31 + .../api/v30/app68/api/user/UserClient.java | 41 + .../api/{ => v30}/app68/model/Body.java | 28 +- .../api/{ => v30}/app68/model/Body1.java | 28 +- .../{app105 => v30/app68}/model/Category.java | 28 +- .../app68}/model/ModelApiResponse.java | 28 +- .../api/{ => v30}/app68/model/Order.java | 28 +- .../api/{ => v30}/app68/model/Pet.java | 28 +- .../api/{app105 => v30/app68}/model/Tag.java | 28 +- .../api/{app105 => v30/app68}/model/User.java | 28 +- .../api/v30/app69/HelloController.java | 40 + .../springdoc/api/v30/app69/PersonDTO.java | 64 + .../api/v30/app69/SpringDocApp69Test.java | 33 + .../api/v30/app7/HelloController.java | 41 + .../api/v30/app7/SpringDocApp7Test.java | 34 + .../api/v30/app70/HelloController.java | 44 + .../api/v30/app70/SpringDocApp70Test.java | 33 + .../app70/customizer/CustomizedOperation.java | 31 + .../app70/customizer/CustomizedParameter.java | 31 + .../app70/customizer/CustomizedProperty.java | 31 + .../app70/customizer/OperationCustomizer.java | 40 + .../app70/customizer/ParameterCustomizer.java | 40 + .../app70/customizer/PropertyCustomizer.java | 37 +- .../api/v30/app70/model/ApiType.java | 37 + .../test/org/springdoc/api/v30/app71/Dog.java | 40 + .../api/v30/app71/HelloController.java | 36 + .../api/v30/app71/SpringDocApp71Test.java | 33 + .../app72/BlockingAutoConfigurationTest.java | 28 +- .../app72/CacheAutoConfigurationTest1.java | 28 +- .../app72/GroupAutoConfigurationTest.java | 28 +- .../api/{ => v30}/app73/HelloController.java | 28 +- .../api/v30/app73/SpringDocApp73Test.java | 33 + .../api/v30/app74/HelloController.java | 49 + .../api/v30/app74/SpringDocApp74Test.java | 33 + .../api/{ => v30}/app75/HelloController.java | 28 +- .../springdoc/api/v30/app75/PersonDTO.java | 64 + .../RestResponseEntityExceptionHandler.java | 44 + .../api/v30/app75/SpringDocApp75Test.java | 34 + .../api/v30/app76/HelloController.java | 48 + .../api/v30/app76/SpringDocApp76Test.java | 53 + .../api/{ => v30}/app77/HelloController.java | 28 +- .../api/v30/app77/SpringDocApp77Test.java | 33 + .../api/v30/app78/HelloController.java | 46 + .../springdoc/api/v30/app78/PersonDTO.java | 64 + .../api/v30/app78/SpringDocApp78Test.java | 33 + .../api/v30/app79/HelloController.java | 40 + .../api/v30/app79/SpringDocApp79Test.java | 34 + .../api/v30/app8/HelloController.java | 34 + .../api/v30/app8/SpringDocApp8Test.java | 45 + .../api/{ => v30}/app80/HelloController.java | 28 +- .../api/v30/app80/SpringDocApp80Test.java | 35 + .../springdoc/api/v30/app80/TestObject.java | 47 + .../api/v30/app81/HelloController.java | 37 + .../{ => v30}/app81/SpringDocApp81Test.java | 32 +- .../api/v30/app82/HelloController.java | 40 + .../springdoc/api/v30/app82/PersonDTO.java | 64 + .../api/v30/app82/SpringDocApp82Test.java | 34 + .../api/{ => v30}/app83/HelloController.java | 28 +- .../springdoc/api/v30/app83/PersonDTO.java | 64 + .../api/v30/app83/SpringDocApp83Test.java | 34 + .../api/v30/app84/HelloController.java | 43 + .../api/v30/app84/SpringDocApp84Test.java | 34 + .../api/v30/app85/HelloController.java | 46 + .../api/v30/app85/SpringDocApp85Test.java | 34 + .../api/v30/app86/HelloController.java | 42 + .../api/v30/app86/SpringDocApp86Test.java | 37 + .../api/v30/app86/test/HelloController2.java | 42 + .../api/v30/app87/HelloController.java | 54 + .../api/v30/app87/SpringDocApp87Test.java | 34 + .../api/v30/app88/HelloController.java | 36 + .../api/v30/app88/SpringDocApp88Test.java | 35 + .../api/v30/app89/HelloController.java | 41 + .../api/v30/app89/SpringDocApp89Test.java | 44 + .../org/springdoc/api/v30/app9/MyApi.java | 41 + .../api/v30/app9/MyApiController.java | 43 + .../api/v30/app9/SpringDocApp9Test.java | 34 + .../api/{ => v30}/app90/HelloController.java | 28 +- .../api/v30/app90/SpringDocApp90Test.java | 30 + .../api/{ => v30}/app90/SpringDocTestApp.java | 28 +- .../springdoc/api/{ => v30}/app90/User.java | 28 +- .../springdoc/api/{ => v30}/app91/Advice.java | 24 +- .../api/{ => v30}/app91/ApiError.java | 24 +- .../org/springdoc/api/v30/app91/Greeting.java | 48 + .../{ => v30}/app91/GreetingController.java | 24 +- .../api/v30/app91/SpringDocApp91Test.java | 37 + .../api/v30/app92/HelloController.java | 40 + .../api/v30/app92/ParameterCustomizer.java | 42 + .../api/v30/app92/SpringDocApp92Test.java | 35 + .../api/v30/app93/BaseClientModel.java | 30 + .../api/v30/app93/BaseController.java | 35 + .../api/v30/app93/SpecificClientModel.java | 30 + .../api/v30/app93/SpecificController.java | 28 + .../api/v30/app93/SpringDocApp93Test.java | 35 + .../{ => v30}/app94/SpringDocApp94Test.java | 36 +- .../api/v30/app95/HelloController.java | 43 + .../api/v30/app95/SpringDocApp95Test.java | 37 + .../api/v30/app96/HelloController.java | 51 + .../api/v30/app96/SpringDocApp96Test.java | 35 + .../api/v30/app97/HelloController.java | 47 + .../api/v30/app97/SpringDocApp97Test.java | 35 + .../springdoc/api/v30/app97/StudentV1.java | 35 + .../springdoc/api/v30/app97/StudentV2.java | 35 + .../springdoc/api/v30/app97/StudentV3.java | 35 + .../api/v30/app98/HelloController.java | 36 + .../v30/app98/IgnoredAnnotationParameter.java | 31 + .../api/v30/app98/SpringDocApp98Test.java | 39 + .../api/v30/app99/HelloController.java | 44 + .../api/v30/app99/SpringDocApp99Test.java | 37 + .../v31/AbstractSpringDocActuatorV31Test.java | 51 + .../api/v31/AbstractSpringDocV31Test.java | 55 + .../springdoc/api/v31/app1/ApiException.java | 37 + .../api/v31/app1/ApiOriginFilter.java | 53 + .../api/v31/app1/ApiResponseMessage.java | 98 ++ .../springdoc/api/v31/app1/ErrorMessage.java | 52 + .../api/v31/app1/ExceptionTranslator.java | 52 + .../api/v31/app1/HelloController.java | 44 + .../api/v31/app1/HomeController.java | 46 + .../springdoc/api/v31/app1/InventoryApi.java | 72 ++ .../api/v31/app1/InventoryApiController.java | 77 ++ .../springdoc/api/v31/app1/InventoryItem.java | 184 +++ .../api/v31/app1/ItemController.java | 68 + .../org/springdoc/api/v31/app1/ItemDTO.java | 130 ++ .../springdoc/api/v31/app1/ItemLightDTO.java | 97 ++ .../springdoc/api/v31/app1/Manufacturer.java | 152 +++ .../api/v31/app1/PeopleRestService.java | 111 ++ .../org/springdoc/api/v31/app1/PersonDTO.java | 64 + .../api/v31/app1/SpringDocApp1Test.java | 50 + .../api/v31/app2/SpringDocApp2Test.java | 50 + .../api/{ => v31}/app2/api/ApiUtil.java | 28 +- .../app2/api/ExceptionTranslator.java | 28 +- .../api/v31/app2/api/HomeController.java | 46 + .../api/pet => v31/app2/api}/PetApi.java | 34 +- .../api/v31/app2/api/PetApiController.java | 48 + .../pet => v31/app2/api}/PetApiDelegate.java | 33 +- .../api/v31/app2/api/PetApiDelegateImpl.java | 31 + .../springdoc/api/v31/app2/api/StoreApi.java | 109 ++ .../api/v31/app2/api/StoreApiController.java | 48 + .../app2/api}/StoreApiDelegate.java | 31 +- .../v31/app2/api/StoreApiDelegateImpl.java | 31 + .../api/user => v31/app2/api}/UserApi.java | 30 +- .../api/v31/app2/api/UserApiController.java | 50 + .../app2/api}/UserApiDelegate.java | 31 +- .../api/v31/app2/api/UserApiDelegateImpl.java | 31 + .../api/{app105 => v31/app2}/model/Body.java | 28 +- .../api/{app105 => v31/app2}/model/Body1.java | 28 +- .../{app68 => v31/app2}/model/Category.java | 28 +- .../app2}/model/ModelApiResponse.java | 28 +- .../api/{app105 => v31/app2}/model/Order.java | 28 +- .../api/{app105 => v31/app2}/model/Pet.java | 28 +- .../api/{app68 => v31/app2}/model/Tag.java | 28 +- .../api/{app68 => v31/app2}/model/User.java | 28 +- .../api/v31/app4/HelloController.java | 37 + .../api/v31/app4/SpringDocApp4Test.java | 42 + .../springdoc/api/v31/app4/TrackerData.java | 44 + .../resources/results/{ => 3.0.1}/app1.json | 0 .../resources/results/{ => 3.0.1}/app10.json | 0 .../resources/results/{ => 3.0.1}/app100.json | 0 .../resources/results/{ => 3.0.1}/app101.json | 0 .../resources/results/{ => 3.0.1}/app102.json | 0 .../resources/results/{ => 3.0.1}/app103.json | 0 .../resources/results/{ => 3.0.1}/app104.json | 0 .../results/{ => 3.0.1}/app105-1.json | 0 .../results/{ => 3.0.1}/app105-2.json | 0 .../results/{ => 3.0.1}/app105-3.json | 0 .../results/{ => 3.0.1}/app105-4.json | 0 .../resources/results/{ => 3.0.1}/app106.json | 0 .../resources/results/{ => 3.0.1}/app107.json | 0 .../resources/results/{ => 3.0.1}/app108.json | 0 .../resources/results/{ => 3.0.1}/app109.json | 0 .../resources/results/{ => 3.0.1}/app11.json | 0 .../resources/results/{ => 3.0.1}/app110.json | 0 .../resources/results/{ => 3.0.1}/app111.json | 0 .../resources/results/{ => 3.0.1}/app112.json | 0 .../resources/results/{ => 3.0.1}/app113.json | 0 .../resources/results/{ => 3.0.1}/app114.json | 0 .../resources/results/{ => 3.0.1}/app115.json | 0 .../resources/results/{ => 3.0.1}/app116.json | 0 .../resources/results/{ => 3.0.1}/app117.json | 0 .../resources/results/{ => 3.0.1}/app118.json | 0 .../resources/results/{ => 3.0.1}/app119.json | 0 .../resources/results/{ => 3.0.1}/app12.json | 0 .../resources/results/{ => 3.0.1}/app120.json | 0 .../resources/results/{ => 3.0.1}/app121.json | 0 .../resources/results/{ => 3.0.1}/app122.json | 0 .../resources/results/{ => 3.0.1}/app123.json | 0 .../resources/results/{ => 3.0.1}/app124.json | 0 .../resources/results/{ => 3.0.1}/app125.json | 0 .../resources/results/{ => 3.0.1}/app126.json | 0 .../resources/results/{ => 3.0.1}/app128.json | 0 .../resources/results/{ => 3.0.1}/app129.json | 0 .../resources/results/{ => 3.0.1}/app13.json | 0 .../resources/results/{ => 3.0.1}/app130.json | 0 .../resources/results/{ => 3.0.1}/app131.json | 0 .../resources/results/{ => 3.0.1}/app132.json | 0 .../resources/results/{ => 3.0.1}/app133.json | 0 .../results/{ => 3.0.1}/app134-1.json | 0 .../results/{ => 3.0.1}/app134-2.json | 0 .../results/{ => 3.0.1}/app134-3.json | 0 .../results/{ => 3.0.1}/app134-4.json | 0 .../results/{ => 3.0.1}/app134-5.json | 0 .../resources/results/{ => 3.0.1}/app135.json | 0 .../resources/results/{ => 3.0.1}/app136.json | 0 .../resources/results/{ => 3.0.1}/app137.json | 0 .../resources/results/{ => 3.0.1}/app138.json | 0 .../resources/results/{ => 3.0.1}/app139.json | 0 .../resources/results/{ => 3.0.1}/app14.json | 0 .../resources/results/{ => 3.0.1}/app140.json | 0 .../resources/results/{ => 3.0.1}/app141.json | 0 .../resources/results/{ => 3.0.1}/app142.json | 0 .../resources/results/{ => 3.0.1}/app143.json | 0 .../resources/results/{ => 3.0.1}/app144.json | 0 .../resources/results/{ => 3.0.1}/app145.json | 0 .../results/{ => 3.0.1}/app146-1.json | 0 .../results/{ => 3.0.1}/app146-2.json | 0 .../results/{ => 3.0.1}/app147-1.json | 0 .../results/{ => 3.0.1}/app147-2.json | 0 .../results/{ => 3.0.1}/app148-1.json | 0 .../results/{ => 3.0.1}/app148-2.json | 0 .../resources/results/{ => 3.0.1}/app149.json | 0 .../resources/results/{ => 3.0.1}/app15.json | 0 .../resources/results/{ => 3.0.1}/app150.json | 0 .../resources/results/{ => 3.0.1}/app151.json | 0 .../resources/results/{ => 3.0.1}/app152.json | 0 .../resources/results/{ => 3.0.1}/app153.json | 0 .../resources/results/{ => 3.0.1}/app154.json | 0 .../resources/results/{ => 3.0.1}/app155.json | 0 .../resources/results/{ => 3.0.1}/app156.json | 0 .../resources/results/{ => 3.0.1}/app157.json | 0 .../resources/results/{ => 3.0.1}/app158.json | 0 .../resources/results/{ => 3.0.1}/app159.json | 0 .../results/{ => 3.0.1}/app160-1.json | 0 .../resources/results/{ => 3.0.1}/app160.json | 0 .../resources/results/{ => 3.0.1}/app161.json | 0 .../resources/results/{ => 3.0.1}/app162.json | 0 .../resources/results/{ => 3.0.1}/app163.json | 0 .../resources/results/{ => 3.0.1}/app164.json | 0 .../resources/results/{ => 3.0.1}/app165.json | 0 .../resources/results/{ => 3.0.1}/app166.json | 0 .../resources/results/{ => 3.0.1}/app167.json | 0 .../resources/results/{ => 3.0.1}/app168.json | 0 .../resources/results/{ => 3.0.1}/app169.json | 0 .../resources/results/{ => 3.0.1}/app17.json | 0 .../resources/results/{ => 3.0.1}/app170.json | 0 .../results/{ => 3.0.1}/app171-en-GB.json | 0 .../results/{ => 3.0.1}/app171-en-US.json | 0 .../results/{ => 3.0.1}/app171-fr-FR.json | 0 .../resources/results/{ => 3.0.1}/app172.json | 0 .../resources/results/{ => 3.0.1}/app173.json | 0 .../resources/results/{ => 3.0.1}/app174.json | 0 .../resources/results/{ => 3.0.1}/app175.json | 0 .../resources/results/{ => 3.0.1}/app176.json | 0 .../results/{ => 3.0.1}/app177-1.json | 0 .../results/{ => 3.0.1}/app177-2.json | 0 .../results/{ => 3.0.1}/app177-3.json | 0 .../resources/results/{ => 3.0.1}/app177.json | 0 .../results/{ => 3.0.1}/app178-1.json | 0 .../results/{ => 3.0.1}/app178-2.json | 0 .../results/{ => 3.0.1}/app178-3.json | 0 .../resources/results/{ => 3.0.1}/app178.json | 0 .../resources/results/{ => 3.0.1}/app179.json | 0 .../resources/results/{ => 3.0.1}/app18.json | 0 .../resources/results/{ => 3.0.1}/app180.json | 0 .../resources/results/{ => 3.0.1}/app181.json | 0 .../resources/results/{ => 3.0.1}/app182.json | 0 .../resources/results/{ => 3.0.1}/app183.json | 0 .../results/{ => 3.0.1}/app184-1.json | 0 .../results/{ => 3.0.1}/app184-2.json | 0 .../results/{ => 3.0.1}/app184-3.json | 0 .../resources/results/{ => 3.0.1}/app184.json | 0 .../resources/results/{ => 3.0.1}/app185.json | 0 .../resources/results/{ => 3.0.1}/app19.json | 0 .../resources/results/{ => 3.0.1}/app2.json | 0 .../resources/results/{ => 3.0.1}/app20.json | 0 .../resources/results/{ => 3.0.1}/app21.json | 0 .../resources/results/{ => 3.0.1}/app22.json | 0 .../resources/results/{ => 3.0.1}/app23.json | 0 .../resources/results/{ => 3.0.1}/app24.json | 0 .../resources/results/{ => 3.0.1}/app25.json | 0 .../resources/results/{ => 3.0.1}/app26.json | 0 .../resources/results/{ => 3.0.1}/app27.json | 0 .../resources/results/{ => 3.0.1}/app28.json | 0 .../resources/results/{ => 3.0.1}/app29.json | 0 .../resources/results/{ => 3.0.1}/app30.json | 0 .../resources/results/{ => 3.0.1}/app31.json | 0 .../resources/results/{ => 3.0.1}/app32.json | 0 .../resources/results/{ => 3.0.1}/app33.json | 0 .../resources/results/{ => 3.0.1}/app34.json | 0 .../resources/results/{ => 3.0.1}/app35.json | 0 .../resources/results/{ => 3.0.1}/app36.json | 0 .../resources/results/{ => 3.0.1}/app37.json | 0 .../resources/results/{ => 3.0.1}/app38.json | 0 .../resources/results/{ => 3.0.1}/app39.json | 0 .../resources/results/{ => 3.0.1}/app4.json | 6 +- .../resources/results/{ => 3.0.1}/app40.json | 0 .../resources/results/{ => 3.0.1}/app41.json | 0 .../resources/results/{ => 3.0.1}/app42.json | 0 .../resources/results/{ => 3.0.1}/app43.json | 0 .../resources/results/{ => 3.0.1}/app44.json | 0 .../resources/results/{ => 3.0.1}/app45.json | 0 .../resources/results/{ => 3.0.1}/app46.json | 0 .../resources/results/{ => 3.0.1}/app47.json | 0 .../resources/results/{ => 3.0.1}/app48.json | 0 .../resources/results/{ => 3.0.1}/app49.json | 0 .../resources/results/{ => 3.0.1}/app50.json | 0 .../resources/results/{ => 3.0.1}/app51.json | 0 .../resources/results/{ => 3.0.1}/app52.json | 0 .../resources/results/{ => 3.0.1}/app53.json | 0 .../resources/results/{ => 3.0.1}/app54.json | 0 .../resources/results/{ => 3.0.1}/app55.json | 0 .../resources/results/{ => 3.0.1}/app56.json | 0 .../resources/results/{ => 3.0.1}/app57.json | 0 .../resources/results/{ => 3.0.1}/app58.json | 0 .../resources/results/{ => 3.0.1}/app59.json | 0 .../resources/results/{ => 3.0.1}/app6.json | 0 .../resources/results/{ => 3.0.1}/app60.json | 0 .../resources/results/{ => 3.0.1}/app61.json | 0 .../resources/results/{ => 3.0.1}/app62.json | 0 .../resources/results/{ => 3.0.1}/app63.json | 0 .../resources/results/{ => 3.0.1}/app64.json | 0 .../resources/results/{ => 3.0.1}/app65.json | 0 .../resources/results/{ => 3.0.1}/app66.json | 0 .../resources/results/{ => 3.0.1}/app67.json | 0 .../results/{ => 3.0.1}/app68-1.json | 0 .../results/{ => 3.0.1}/app68-2.json | 0 .../results/{ => 3.0.1}/app68-3.json | 0 .../results/{ => 3.0.1}/app68-4.json | 0 .../resources/results/{ => 3.0.1}/app69.json | 0 .../resources/results/{ => 3.0.1}/app7.json | 0 .../resources/results/{ => 3.0.1}/app70.json | 0 .../resources/results/{ => 3.0.1}/app71.json | 0 .../resources/results/{ => 3.0.1}/app73.json | 0 .../resources/results/{ => 3.0.1}/app74.json | 0 .../resources/results/{ => 3.0.1}/app75.json | 0 .../resources/results/{ => 3.0.1}/app76.json | 0 .../resources/results/{ => 3.0.1}/app77.json | 0 .../resources/results/{ => 3.0.1}/app78.json | 0 .../resources/results/{ => 3.0.1}/app79.json | 0 .../resources/results/{ => 3.0.1}/app8.json | 0 .../resources/results/{ => 3.0.1}/app80.json | 0 .../resources/results/{ => 3.0.1}/app82.json | 0 .../resources/results/{ => 3.0.1}/app83.json | 0 .../resources/results/{ => 3.0.1}/app84.json | 0 .../resources/results/{ => 3.0.1}/app85.json | 0 .../resources/results/{ => 3.0.1}/app86.json | 0 .../resources/results/{ => 3.0.1}/app87.json | 0 .../resources/results/{ => 3.0.1}/app88.json | 0 .../resources/results/{ => 3.0.1}/app89.json | 0 .../resources/results/{ => 3.0.1}/app9.json | 0 .../resources/results/{ => 3.0.1}/app90.json | 0 .../resources/results/{ => 3.0.1}/app91.json | 0 .../resources/results/{ => 3.0.1}/app92.json | 0 .../resources/results/{ => 3.0.1}/app93.json | 0 .../resources/results/{ => 3.0.1}/app94.json | 0 .../resources/results/{ => 3.0.1}/app95.json | 0 .../resources/results/{ => 3.0.1}/app96.json | 0 .../resources/results/{ => 3.0.1}/app97.json | 0 .../resources/results/{ => 3.0.1}/app98.json | 0 .../resources/results/{ => 3.0.1}/app99.json | 0 .../test/resources/results/3.1.0/app1.json | 582 +++++++++ .../test/resources/results/3.1.0/app2.json | 1104 +++++++++++++++++ .../test/resources/results/3.1.0/app4.json | 70 ++ 1310 files changed, 25949 insertions(+), 14113 deletions(-) create mode 100644 springdoc-openapi-common/src/main/java/org/springdoc/api/mixins/SortedOpenAPIMixin31.java create mode 100644 springdoc-openapi-common/src/main/java/org/springdoc/api/mixins/SortedSchemaMixin31.java create mode 100644 springdoc-openapi-common/src/main/java/org/springdoc/core/providers/ObjectMapperProvider.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/AbstractSpringDocActuatorTest.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ApiException.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ErrorMessage.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/HomeController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/PersonDTO.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app10/SpringDocApp10Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app100/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app100/PersonDTO.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app100/SpringDocApp100Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app101/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app101/HelloDTO.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app101/SpringDocApp101Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app102/InheritedRequestParams.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app102/SpringDocApp102Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app102/TestController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app103/ExampleBody.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app103/SpringDocApp103Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app104/CrudController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app104/Design.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app104/DesignController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app104/HavingPK.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app104/SpringDocApp104Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/HomeController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/pet/PetApiController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/pet/PetApiDelegateImpl.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/store/StoreApiController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/store/StoreApiDelegateImpl.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/user/UserApiController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/user/UserApiDelegateImpl.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app106/SpringDocApp106Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app107/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app107/SpringDocApp107Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app108/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app108/SpringDocApp108Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app109/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app109/SpringDocApp109Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app11/SpringDocApp11Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/ErrorMessage.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/Problem.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/ErrorMessage.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/Problem.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/ErrorMessage.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/Problem.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app113/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app113/SpringDocApp113Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app114/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app114/SpringDocApp114Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app115/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app115/SpringDocApp115Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app116/FooErrorHandler.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app116/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app116/SpringDocApp116Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app117/SpringDocApp117Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app118/SpringDocApp118Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app119/JsonRequest.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app119/SpringDocApp119Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app12/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app12/SpringDocApp12Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app120/SpringDocApp120Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app121/InheritedRequestParams.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app121/TestController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app123/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app124/MyExceptionHandler.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app125/DeprecatedEntity.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app125/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/AbstractObject.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/ConcreteObjectA.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/ConcreteType.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/Umbrella.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app128/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app129/ActualReturnedEntity.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app129/OperationResponse.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app13/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app13/PersonDTO.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app13/SpringDocApp13Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app130/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app130/TrackerData.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app131/RestControllerError.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app132/RestControllerError.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app135/Book.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app135/BookRepository.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app137/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app138/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app139/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app14/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app14/SpringDocApp14Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app143/HelloHiddenController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app143/SpringDocApp143Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app144/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app145/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app146/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app147/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app148/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app149/HelloMessage.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app149/HiddenHelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app149/SpringDocApp149Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app15/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app150/SpringDocApp150Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app151/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app151/SpringDocApp151Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app152/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app152/SpringDocApp152Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app153/OrderState.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app153/OrderStateMapper.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app153/SpringDocApp153Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app153/TestController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app154/SpringDocApp154Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/AbstractIntParameterObject.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/AbstractParameterObject.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/ConcreteEnum.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/ConcreteIntParameterObject.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/ConcreteParameterObject.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/SpringDocApp155Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app156/SomeEnum.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app156/SpringDocApp156Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app156/User.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app157/Bar.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app157/Foo.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app157/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app157/StringyConverter.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/CommonFooErrorHandler.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/ErrorDTO.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/SimpleDTO.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/SpecificFooErrorHandler.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/SpringDocApp158Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/CustomException.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/FooBean.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/SpringDocApp159Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/Views.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app16/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app16/SpringDocApp16Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app160/SpringDocApp160Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app161/SpringDocApp161Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app162/OpenApiConfig.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app162/SpringDocApp162Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app163/ExampleRegistrationCustomizer.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app163/SpringDocApp163Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app164/SpringDocApp164Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app164/TestApiController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app165/SpringDocApp165Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app166/GlobalErrorResponseDto.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app166/GlobalExceptionHandler.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app166/LocalErrorResponseDto.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app166/SpringDocApp166Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app166/TestApiController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app167/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app167/SpringDocApp167Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app168/SpringDocApp168Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app169/DefaultWebMvcRegistrations.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app169/SpringDocApp169Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app169/TestController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app17/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app17/SpringDocApp17Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app170/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app170/SpringDocApp170Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app171/HelloLocaleController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app172/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app173/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app174/PersonDTO.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app175/PersonDTO.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app176/PersonDTO.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/MyConfiguration.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/MyIdPathVariable.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/MyObj.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/MyPathParameterCustomizer.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/SpringDocApp179Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app18/SpringDocApp18Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app180/MapExclusion.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app181/AbstractParameterObject.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app181/ConcreteParameterObject.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app181/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app181/SpringDocApp181Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app182/SpringDocApp182Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app183/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app183/SpringDocApp183Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app183/User.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app183/UserConverter.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app183/WebConfig.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app184/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app185/Cat.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app185/Dog.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app185/Pet.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app185/PetController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app185/SpringDocApp185Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app19/SpringDocApp19Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/HomeController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/PetApiController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/PetApiDelegateImpl.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/StoreApiController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/StoreApiDelegateImpl.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/UserApiDelegateImpl.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app20/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app20/SpringDocApp20Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app21/SpringDocApp21Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app22/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app22/PersonDTO.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app22/SpringDocApp22Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app23/SpringDocApp23Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app24/SpringDocApp24Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app25/SpringDocApp25Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app26/Bar.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app26/Foo.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app26/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app26/MyModel.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app26/SpringDocApp26Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/Bar.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/Foo.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/MyException.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app28/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app28/SpringDocApp28Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app29/SpringDocApp29Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app29/TrackerData.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app30/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app30/SpringDocApp30Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app31/SpringDocApp31Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app32/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app32/SpringDocApp32Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app33/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app33/SpringDocApp33Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app34/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app34/SpringDocApp34Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app35/SpringDocApp35Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app36/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/Bar.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/Car.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/Foo.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/Pet.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/SpringDocApp37Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app38/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app38/SpringDocApp38Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app39/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app39/SpringDocApp39Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app4/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app4/SpringDocApp4Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app4/TrackerData.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app40/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app40/SpringDocApp40Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app42/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app42/SpringDocApp42Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app42/TweetId.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app43/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app43/SpringDocApp43Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app45/OpenApiConfig.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app45/PersonDTO.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app45/SpringDocApp45Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app46/SpringDocApp46Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app47/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app47/SpringDocApp47Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app48/AbstractHelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app48/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app48/SpringDocApp48Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app49/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app49/SpringDocApp49Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app5/CustomOpenAPIConfig.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app50/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app50/SpringDocApp50Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app51/SpringDocApp51Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app52/SpringDocApp52Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app53/SpringDocApp53Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app54/MealParty.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app54/SpringDocApp54Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app54/Views.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app55/SpringDocApp55Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app56/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app56/SpringDocApp56Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app57/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app57/SpringDocApp57Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app58/SpringDocApp58Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app59/HelloBody.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app59/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app59/HelloController2.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app59/SpringDocApp59Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app6/SpringDocApp6Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app60/QueryPaging.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app60/QuerySort.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app60/SpringDocApp60Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app61/SpringDocApp61Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app62/BaseController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app62/SpringDocApp62Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app62/TestController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app63/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app63/SpringDocApp63Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app64/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app64/SpringDocApp64Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app65/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app65/SpringDocApp65Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app66/DefaultHealthCheckApi.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app66/SpringDocApp66Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app66/UndocumentedClass.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app67/SpringDocApp67Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/CustomizedOperation.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/HomeController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/pet/PetApiController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/pet/PetApiDelegateImpl.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/store/StoreApiController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/store/StoreApiDelegateImpl.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/user/UserApiController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/user/UserApiDelegateImpl.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/user/UserClient.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app69/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app69/PersonDTO.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app69/SpringDocApp69Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app7/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app7/SpringDocApp7Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/SpringDocApp70Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/CustomizedOperation.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/CustomizedParameter.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/CustomizedProperty.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/OperationCustomizer.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/ParameterCustomizer.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/model/ApiType.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app71/Dog.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app71/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app71/SpringDocApp71Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app73/SpringDocApp73Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app74/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app74/SpringDocApp74Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app75/PersonDTO.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app75/RestResponseEntityExceptionHandler.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app75/SpringDocApp75Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app76/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app76/SpringDocApp76Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app77/SpringDocApp77Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app78/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app78/PersonDTO.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app78/SpringDocApp78Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app79/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app79/SpringDocApp79Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app8/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app8/SpringDocApp8Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app80/SpringDocApp80Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app80/TestObject.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app81/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app82/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app82/PersonDTO.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app82/SpringDocApp82Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app83/PersonDTO.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app83/SpringDocApp83Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app84/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app84/SpringDocApp84Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app85/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app85/SpringDocApp85Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app86/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app86/SpringDocApp86Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app86/test/HelloController2.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app87/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app87/SpringDocApp87Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app88/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app88/SpringDocApp88Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app89/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app89/SpringDocApp89Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app9/MyApi.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app9/MyApiController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app90/SpringDocApp90Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app91/Greeting.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app91/SpringDocApp91Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app92/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app92/ParameterCustomizer.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app92/SpringDocApp92Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app93/BaseClientModel.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app93/BaseController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app93/SpecificClientModel.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app93/SpecificController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app93/SpringDocApp93Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app95/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app95/SpringDocApp95Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app96/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app96/SpringDocApp96Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app97/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app97/SpringDocApp97Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app97/StudentV1.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app97/StudentV2.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app97/StudentV3.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app98/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app98/IgnoredAnnotationParameter.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app98/SpringDocApp98Test.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app99/HelloController.java delete mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app99/SpringDocApp99Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/AbstractSpringDocActuatorV30Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{AbstractSpringDocTest.java => v30/AbstractSpringDocV30Test.java} (52%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ApiException.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app1/ApiOriginFilter.java (56%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app1/ApiResponseMessage.java (62%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ErrorMessage.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app1/ExceptionTranslator.java (55%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/HomeController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app1/InventoryApi.java (77%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app1/InventoryApiController.java (73%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app1/InventoryItem.java (81%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app1/ItemController.java (71%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app1/ItemDTO.java (68%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app1/ItemLightDTO.java (58%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app1/Manufacturer.java (77%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app1/PeopleRestService.java (84%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/PersonDTO.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app1/SpringDocApp1Test.java (51%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app10/HelloController.java (50%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app10/SpringDocApp10Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app100/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app100/PersonDTO.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app100/SpringDocApp100Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app101/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app101/HelloDTO.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app101/SpringDocApp101Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app102/InheritedRequestParams.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app102/RequestParams.java (73%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app102/SpringDocApp102Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app102/TestController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app103/ExampleBody.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app103/HelloController.java (56%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app103/SpringDocApp103Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app104/CrudController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app104/Design.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app104/DesignController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app104/HavingPK.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app104/SpringDocApp104Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app105/SpringDocApp105Test.java (69%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/ApiUtil.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/ExceptionTranslator.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/HomeController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app105/api/pet/PetApi.java (90%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiDelegate.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiDelegateImpl.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app105/api/store/StoreApi.java (82%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiDelegate.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiDelegateImpl.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApi.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiDelegate.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiDelegateImpl.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Body.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Body1.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Category.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/ModelApiResponse.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Order.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Pet.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Tag.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/User.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app106/HelloController.java (54%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app106/SpringDocApp106Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app107/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app107/SpringDocApp107Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app108/ActionResult.java (54%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app108/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app108/SpringDocApp108Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app109/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app109/SpringDocApp109Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app11/HelloController.java (58%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app11/SpringDocApp11Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/ErrorMessage.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app110/GlobalControllerAdvice.java (86%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app111 => v30/app110}/Person.java (66%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app111 => v30/app110}/PersonController.java (65%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app112/sample => v30/app110}/PersonController2.java (65%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/Problem.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app110/SpringDocApp110Test.java (50%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/ErrorMessage.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app112 => v30/app111}/GlobalControllerAdvice.java (85%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app112 => v30/app111}/Person.java (66%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app112 => v30/app111}/PersonController.java (65%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app111/PersonController2.java (65%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/Problem.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app111/SpringDocApp111Test.java (50%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/ErrorMessage.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app111 => v30/app112}/GlobalControllerAdvice.java (85%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app110 => v30/app112}/Person.java (66%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app110 => v30/app112}/PersonController.java (65%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/Problem.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app112/SpringDocApp112Test.java (50%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app110 => v30/app112/sample}/PersonController2.java (63%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app113/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app113/SpringDocApp113Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app114/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app114/SpringDocApp114Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app115/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app115/JavaTimeOperationCustomizer.java (58%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app115/SpringDocApp115Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app116/FooErrorHandler.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app116/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app116/SpringDocApp116Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app117/HelloApplication.java (84%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app117/SpringDocApp117Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app168 => v30/app118}/AbstractParent.java (56%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app118/ConcreteParent.java (56%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app118/Controller.java (56%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app118/SpringDocApp118Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app119/HelloController.java (61%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app119/JsonRequest.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app119/SpringDocApp119Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app12/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app12/SpringDocApp12Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app120/AccountId.java (58%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app120/MetaAnnotationController.java (86%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app120/SpringDocApp120Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app121/InheritedRequestParams.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app121/RequestParams.java (72%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app121/SpringDocApp121Test.java (79%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app121/TestController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app122/BaseController.java (91%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app122/BaseObject.java (88%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app122/CustomerDto.java (89%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app122/FirstController.java (89%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app122/SpringDocApp122Test.java (79%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app122/Wrapper.java (88%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app123/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app123/MyExceptionHandler.java (50%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app123/SpringDocApp123Test.java (79%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app124/HelloController.java (57%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app124/MyExceptionHandler.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app124/SpringDocApp124Test.java (79%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app125/DeprecatedEntity.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app125/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app125/SpringDocApp125Test.java (87%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app126/HelloController.java (71%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app126/Problem.java (70%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app126/SecurityProblemResponsesConfiguration.java (71%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app126/SpringDocApp126Test.java (88%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/AbstractObject.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/ConcreteObjectA.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/ConcreteType.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app127/Controller.java (54%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app127/SpringDocApp127Test.java (87%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/Umbrella.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app128/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app128/SpringDocApp128Test.java (90%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app129/ActualReturnedEntity.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app129/HelloController.java (50%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app129/OperationResponse.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app129/SpringDocApp129Test.java (79%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app13/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app13/PersonDTO.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app13/SpringDocApp13Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app130/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app130/SpringDocApp130Test.java (79%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app130/TrackerData.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app131/HelloController.java (72%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app131/Organization.java (53%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app131/RestControllerError.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app131/SpringDocApp131Test.java (79%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app132/HelloController.java (73%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app132/Organization.java (53%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app132/RestControllerError.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app132/SpringDocApp132Test.java (79%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app133/HelloController.java (59%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app133/SpringDocApp133Test.java (79%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app134/HelloController.java (81%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app134/OpenApiConfig.java (58%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app134/SpringDocApp134Test.java (79%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app141 => v30/app135}/Book.java (92%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app141 => v30/app135}/BookRepository.java (91%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app135/BookRouter.java (89%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app135/SpringDocApp135Test.java (79%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app136/OperationIdController.java (51%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app136/SpringDocApp136Test.java (94%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app137/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app137/OpenApiConfig.java (52%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app137/SpringDocApp137Test.java (81%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app138/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app138/SpringDocApp138Test.java (82%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app139/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app139/SpringDocApp139Test.java (82%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app14/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app14/SpringDocApp14Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app140/HelloApplication.java (98%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app140/SpringDocApp140Test.java (78%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app141/Book.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app141/BookRepository.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app141/BookRouter.java (97%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app141/SpringDocApp141Test.java (79%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app142/HelloApplication.java (97%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app142/SpringDocApp142Test.java (78%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app143/HelloHiddenController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app143/SpringDocApp143Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app144/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app144/SpringDocApp144Test.java (58%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app145/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app145/SpringDocApp145Test.java (71%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app146/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app146/SpringDocApp146Test.java (61%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app147/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app147/SpringDocApp147Test.java (63%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app148/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app148/SpringDocApp148Test.java (67%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app149/HelloController.java (63%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app149/HelloMessage.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app149/HiddenHelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app149/SpringDocApp149Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app15/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app15/SpringDocApp15Test.java (65%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app150/HelloController.java (67%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app150/SpringDocApp150Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app151/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app151/SpringDocApp151Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app152/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app152/SpringDocApp152Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app153/OrderState.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app153/OrderStateMapper.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app153/SpringDocApp153Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app153/TestController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app154/HelloController.java (52%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app154/OpenApiConfiguration.java (50%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app154/SpringDocApp154Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/AbstractIntParameterObject.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/AbstractParameterObject.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/ConcreteEnum.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/ConcreteIntParameterObject.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/ConcreteParameterObject.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app155/HelloController.java (51%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/SpringDocApp155Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app156/HelloController.java (66%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app156/SomeEnum.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app156/SpringDocApp156Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app156/User.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app157/Bar.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app157/Foo.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app157/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app157/SpringDocApp157Test.java (58%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app157/StringyConverter.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/CommonFooErrorHandler.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/ErrorDTO.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/SimpleDTO.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/SpecificFooErrorHandler.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/SpringDocApp158Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/CustomException.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/FooBean.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app159/FooErrorHandler.java (54%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/SpringDocApp159Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/Views.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app16/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app16/SpringDocApp16Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app160/HelloController.java (65%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app160/SpringDocApp160Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app161/HelloController.java (63%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app161/SpringDocApp161Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app162/OpenApiConfig.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app162/SpringDocApp162Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app163/CommissionDto.java (50%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app163/CommissionsResource.java (59%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app163/ExampleRegistrationCustomizer.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app163/Examples.java (75%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app163/SpringDocApp163Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app164/SampleResponseClass.java (57%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app164/SpringDocApp164Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app164/TestApiController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app165/HelloController.java (63%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app165/SpringDocApp165Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app166/GlobalErrorResponseDto.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app166/GlobalExceptionHandler.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app166/LocalErrorResponseDto.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app166/SpringDocApp166Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app166/TestApiController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app167/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app167/SpringDocApp167Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app118 => v30/app168}/AbstractParent.java (56%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app168/ConcreteParent.java (56%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app168/Controller.java (56%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app168/SpringDocApp168Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app169/DefaultRequestMappingHandlerMapping.java (63%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app169/DefaultWebMvcRegistrations.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app169/SpringDocApp169Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app169/TestController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app17/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app17/SpringDocApp17Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app170/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app170/SpringDocApp170Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app171/HelloLocaleController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app171/SpringDocApp171Test.java (66%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app172/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app172/SpringDocApp172Test.java (60%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app173/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app173/SpringDocApp173Test.java (60%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app174/PersonDTO.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app174/SpringDocApp174Test.java (69%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app175/PersonDTO.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app175/SpringDocApp175Test.java (76%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app176/HelloController.java (59%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app176/PersonDTO.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app176/SpringDocApp176Test.java (78%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app177/AnnotatedController.java (69%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app177/SpringDocApp177Test.java (81%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app178/AnnotatedController.java (72%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app178/SpringDocApp178Test.java (81%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/MyConfiguration.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/MyIdPathVariable.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/MyObj.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app179/MyObjArgumentResolver.java (50%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/MyPathParameterCustomizer.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/SpringDocApp179Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app18/HelloController.java (61%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app18/SpringDocApp18Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app180/Body.java (60%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app180/MapExclusion.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app180/RESTService.java (60%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app180/SpringDocApp180Test.java (78%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app181/AbstractParameterObject.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app181/ConcreteParameterObject.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app181/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app181/SpringDocApp181Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app182/HelloController.java (60%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app182/SpringDocApp182Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app183/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app183/SpringDocApp183Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app183/User.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app183/UserConverter.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app183/WebConfig.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app184/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app184/SpringDocApp184Test.java (75%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app185/Cat.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app185/Dog.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app185/Pet.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app185/PetController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app185/SpringDocApp185Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app19/HelloController.java (52%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app19/SpringDocApp19Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app2/SpringDocApp2Test.java (55%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app105 => v30/app2}/api/ApiUtil.java (53%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app105 => v30/app2}/api/ExceptionTranslator.java (60%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/HomeController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app2/api/PetApi.java (90%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app68/api/pet => v30/app2/api}/PetApiDelegate.java (79%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiDelegateImpl.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app2/api/StoreApi.java (82%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app2/api/StoreApiDelegate.java (72%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiDelegateImpl.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app68/api/user => v30/app2/api}/UserApi.java (87%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app2/api/UserApiController.java (51%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app68/api/user => v30/app2/api}/UserApiDelegate.java (77%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiDelegateImpl.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app2/model/Body.java (65%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app2/model/Body1.java (68%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app2/model/Category.java (62%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app2/model/ModelApiResponse.java (69%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app2/model/Order.java (82%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app2/model/Pet.java (84%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app2/model/Tag.java (61%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app2/model/User.java (83%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app20/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app20/SpringDocApp20Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app21/HelloController.java (63%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app21/SpringDocApp21Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app22/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app22/PersonDTO.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app22/SpringDocApp22Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app23/HelloController.java (55%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app23/SpringDocApp23Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app24/HelloController.java (54%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app24/SpringDocApp24Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app24/SpringDocTestApp.java (68%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app25/HelloController.java (80%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app25/SpringDocApp25Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app26/Bar.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app26/Foo.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app26/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app26/MyModel.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app26/SpringDocApp26Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app27/Advice.java (54%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/Bar.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/Foo.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/MyException.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app27/SpringDocApp27Test.java (53%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app28/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app28/SpringDocApp28Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app29/HelloController.java (56%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app29/SpringDocApp29Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app29/TrackerData.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app30/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app30/SpringDocApp30Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app31/HelloController.java (74%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app31/SpringDocApp31Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app32/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app32/SpringDocApp32Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app33/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app33/SpringDocApp33Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app34/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app34/MyExceptionHandler.java (50%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app34/SpringDocApp34Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app35/HelloController.java (68%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app35/SpringDocApp35Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app36/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app36/SpringDocApp36Test.java (60%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/Bar.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/Car.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/Foo.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app37/HelloController.java (62%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/Pet.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/SpringDocApp37Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app38/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app38/SpringDocApp38Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app39/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app39/SpringDocApp39Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app39/SpringDocTestApp.java (60%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app4/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app4/SpringDocApp4Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app4/TrackerData.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app40/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app40/SpringDocApp40Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app41/HelloController.java (67%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app41/SpringDocApp411Test.java (61%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app41/SpringDocApp41Test.java (62%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app42/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app42/SpringDocApp42Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app42/TweetId.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app43/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app43/SpringDocApp43Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app44/HelloController.java (79%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app44/SpringDocApp44Test.java (62%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app45/HelloController.java (69%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app45/HelloController2.java (70%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app45/OpenApiConfig.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app45/PersonDTO.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app45/SpringDocApp45Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app46/HelloController.java (64%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app46/SpringDocApp46Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app47/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app47/SpringDocApp47Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app48/AbstractHelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app48/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app48/SpringDocApp48Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app49/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app49/SpringDocApp49Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app49/SpringDocTestApp.java (56%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app5/CustomOpenAPIConfig.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app5/sample/OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest.java (84%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app5/sample/OpenApiResourceCustomConfigurationTest.java (60%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app5/sample/OpenApiResourceNoConfigurationTest.java (59%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app50/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app50/SpringDocApp50Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app50/SpringDocTestApp.java (56%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app51/HelloController.java (72%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app51/SpringDocApp51Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app52/HelloController.java (61%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app52/SpringDocApp52Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app53/HelloController.java (72%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app53/HelloControllerWithGlobalApiResponse.java (60%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app53/SpringDocApp53Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app54/HelloController.java (64%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app54/MealParty.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app54/SpringDocApp54Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app54/Views.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app55/HelloController.java (55%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app55/SpringDocApp55Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app56/GlobalExceptionHandler.java (58%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app56/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app56/SpringDocApp56Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app57/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app57/SpringDocApp57Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app58/HelloController.java (71%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app58/SpringDocApp58Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app59/HelloBody.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app59/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app59/HelloController2.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app59/HelloExceptionHandler.java (63%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app59/SpringDocApp59Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app6/HelloController.java (59%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app6/SpringDocApp6Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app60/HelloController.java (50%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app60/QueryPaging.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app60/QuerySort.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app60/SpringDocApp60Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app61/HelloController.java (60%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app61/SpringDocApp61Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app62/BaseController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app62/SpringDocApp62Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app62/TestController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app63/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app63/SpringDocApp63Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app64/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app64/SpringDocApp64Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app65/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app65/SpringDocApp65Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app66/DefaultHealthCheckApi.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app66/HelloController.java (50%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app66/SpringDocApp66Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app66/UndocumentedClass.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app67/HelloController.java (78%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app67/SpringDocApp67Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/CustomizedOperation.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app68/SpringDocApp68Test.java (71%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app68/SpringDocTestApp.java (76%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app68/api/ApiUtil.java (53%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app68/api/ExceptionTranslator.java (60%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/HomeController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/pet/PetApi.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/pet/PetApiController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app2/api => v30/app68/api/pet}/PetApiDelegate.java (78%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/pet/PetApiDelegateImpl.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app68/api/store/StoreApi.java (82%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/store/StoreApiController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app105 => v30/app68}/api/store/StoreApiDelegate.java (71%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/store/StoreApiDelegateImpl.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app2/api => v30/app68/api/user}/UserApi.java (87%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/user/UserApiController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app2/api => v30/app68/api/user}/UserApiDelegate.java (76%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/user/UserApiDelegateImpl.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/user/UserClient.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app68/model/Body.java (65%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app68/model/Body1.java (68%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app105 => v30/app68}/model/Category.java (61%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app105 => v30/app68}/model/ModelApiResponse.java (69%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app68/model/Order.java (82%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app68/model/Pet.java (84%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app105 => v30/app68}/model/Tag.java (61%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app105 => v30/app68}/model/User.java (83%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app69/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app69/PersonDTO.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app69/SpringDocApp69Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app7/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app7/SpringDocApp7Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/SpringDocApp70Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedOperation.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedParameter.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedProperty.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/OperationCustomizer.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/ParameterCustomizer.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app70/customizer/PropertyCustomizer.java (50%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/model/ApiType.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app71/Dog.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app71/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app71/SpringDocApp71Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app72/BlockingAutoConfigurationTest.java (76%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app72/CacheAutoConfigurationTest1.java (70%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app72/GroupAutoConfigurationTest.java (56%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app73/HelloController.java (56%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app73/SpringDocApp73Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app74/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app74/SpringDocApp74Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app75/HelloController.java (76%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app75/PersonDTO.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app75/RestResponseEntityExceptionHandler.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app75/SpringDocApp75Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app76/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app76/SpringDocApp76Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app77/HelloController.java (59%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app77/SpringDocApp77Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app78/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app78/PersonDTO.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app78/SpringDocApp78Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app79/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app79/SpringDocApp79Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app8/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app8/SpringDocApp8Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app80/HelloController.java (60%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app80/SpringDocApp80Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app80/TestObject.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app81/HelloController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app81/SpringDocApp81Test.java (74%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app82/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app82/PersonDTO.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app82/SpringDocApp82Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app83/HelloController.java (59%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app83/PersonDTO.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app83/SpringDocApp83Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app84/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app84/SpringDocApp84Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app85/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app85/SpringDocApp85Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app86/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app86/SpringDocApp86Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app86/test/HelloController2.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app87/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app87/SpringDocApp87Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app88/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app88/SpringDocApp88Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app89/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app89/SpringDocApp89Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app9/MyApi.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app9/MyApiController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app9/SpringDocApp9Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app90/HelloController.java (68%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app90/SpringDocApp90Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app90/SpringDocTestApp.java (69%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app90/User.java (86%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app91/Advice.java (74%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app91/ApiError.java (53%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app91/Greeting.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app91/GreetingController.java (61%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app91/SpringDocApp91Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app92/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app92/ParameterCustomizer.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app92/SpringDocApp92Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app93/BaseClientModel.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app93/BaseController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app93/SpecificClientModel.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app93/SpecificController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app93/SpringDocApp93Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v30}/app94/SpringDocApp94Test.java (83%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app95/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app95/SpringDocApp95Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app96/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app96/SpringDocApp96Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app97/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app97/SpringDocApp97Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app97/StudentV1.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app97/StudentV2.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app97/StudentV3.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app98/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app98/IgnoredAnnotationParameter.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app98/SpringDocApp98Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app99/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app99/SpringDocApp99Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/AbstractSpringDocActuatorV31Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/AbstractSpringDocV31Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ApiException.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ApiOriginFilter.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ApiResponseMessage.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ErrorMessage.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ExceptionTranslator.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/HomeController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/InventoryApi.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/InventoryApiController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/InventoryItem.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ItemController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ItemDTO.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ItemLightDTO.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/Manufacturer.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/PeopleRestService.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/PersonDTO.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/SpringDocApp1Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/SpringDocApp2Test.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v31}/app2/api/ApiUtil.java (53%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{ => v31}/app2/api/ExceptionTranslator.java (60%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/HomeController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app68/api/pet => v31/app2/api}/PetApi.java (90%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app105/api/pet => v31/app2/api}/PetApiDelegate.java (79%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiDelegateImpl.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApi.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app68/api/store => v31/app2/api}/StoreApiDelegate.java (72%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiDelegateImpl.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app105/api/user => v31/app2/api}/UserApi.java (87%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiController.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app105/api/user => v31/app2/api}/UserApiDelegate.java (77%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiDelegateImpl.java rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app105 => v31/app2}/model/Body.java (65%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app105 => v31/app2}/model/Body1.java (68%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app68 => v31/app2}/model/Category.java (61%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app68 => v31/app2}/model/ModelApiResponse.java (69%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app105 => v31/app2}/model/Order.java (82%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app105 => v31/app2}/model/Pet.java (84%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app68 => v31/app2}/model/Tag.java (61%) rename springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/{app68 => v31/app2}/model/User.java (83%) create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app4/HelloController.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app4/SpringDocApp4Test.java create mode 100644 springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app4/TrackerData.java rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app1.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app10.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app100.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app101.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app102.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app103.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app104.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app105-1.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app105-2.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app105-3.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app105-4.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app106.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app107.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app108.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app109.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app11.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app110.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app111.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app112.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app113.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app114.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app115.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app116.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app117.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app118.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app119.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app12.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app120.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app121.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app122.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app123.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app124.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app125.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app126.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app128.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app129.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app13.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app130.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app131.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app132.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app133.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app134-1.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app134-2.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app134-3.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app134-4.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app134-5.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app135.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app136.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app137.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app138.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app139.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app14.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app140.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app141.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app142.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app143.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app144.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app145.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app146-1.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app146-2.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app147-1.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app147-2.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app148-1.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app148-2.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app149.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app15.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app150.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app151.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app152.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app153.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app154.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app155.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app156.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app157.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app158.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app159.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app160-1.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app160.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app161.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app162.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app163.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app164.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app165.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app166.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app167.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app168.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app169.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app17.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app170.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app171-en-GB.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app171-en-US.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app171-fr-FR.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app172.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app173.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app174.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app175.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app176.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app177-1.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app177-2.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app177-3.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app177.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app178-1.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app178-2.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app178-3.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app178.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app179.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app18.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app180.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app181.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app182.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app183.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app184-1.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app184-2.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app184-3.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app184.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app185.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app19.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app2.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app20.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app21.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app22.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app23.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app24.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app25.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app26.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app27.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app28.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app29.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app30.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app31.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app32.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app33.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app34.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app35.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app36.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app37.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app38.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app39.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app4.json (93%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app40.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app41.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app42.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app43.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app44.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app45.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app46.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app47.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app48.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app49.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app50.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app51.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app52.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app53.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app54.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app55.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app56.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app57.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app58.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app59.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app6.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app60.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app61.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app62.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app63.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app64.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app65.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app66.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app67.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app68-1.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app68-2.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app68-3.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app68-4.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app69.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app7.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app70.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app71.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app73.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app74.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app75.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app76.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app77.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app78.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app79.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app8.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app80.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app82.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app83.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app84.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app85.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app86.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app87.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app88.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app89.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app9.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app90.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app91.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app92.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app93.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app94.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app95.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app96.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app97.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app98.json (100%) rename springdoc-openapi-webmvc-core/src/test/resources/results/{ => 3.0.1}/app99.json (100%) create mode 100644 springdoc-openapi-webmvc-core/src/test/resources/results/3.1.0/app1.json create mode 100644 springdoc-openapi-webmvc-core/src/test/resources/results/3.1.0/app2.json create mode 100644 springdoc-openapi-webmvc-core/src/test/resources/results/3.1.0/app4.json diff --git a/springdoc-openapi-common/src/main/java/org/springdoc/api/AbstractOpenApiResource.java b/springdoc-openapi-common/src/main/java/org/springdoc/api/AbstractOpenApiResource.java index 86e90a4c8..51bd9c45b 100644 --- a/springdoc-openapi-common/src/main/java/org/springdoc/api/AbstractOpenApiResource.java +++ b/springdoc-openapi-common/src/main/java/org/springdoc/api/AbstractOpenApiResource.java @@ -1,19 +1,21 @@ /* * * * - * * * Copyright 2019-2020 the original author or authors. * * * - * * * Licensed under the Apache License, Version 2.0 (the "License"); - * * * you may not use this file except in compliance with the License. - * * * You may obtain a copy of the License at + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. * * * - * * * https://www.apache.org/licenses/LICENSE-2.0 - * * * - * * * Unless required by applicable law or agreed to in writing, software - * * * distributed under the License is distributed on an "AS IS" BASIS, - * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * * See the License for the specific language governing permissions and - * * * limitations under the License. * * * */ @@ -52,9 +54,7 @@ import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator.Feature; import io.swagger.v3.core.filter.SpecFilter; -import io.swagger.v3.core.util.Json; import io.swagger.v3.core.util.ReflectionUtils; -import io.swagger.v3.core.util.Yaml; import io.swagger.v3.oas.annotations.Hidden; import io.swagger.v3.oas.annotations.callbacks.Callback; import io.swagger.v3.oas.annotations.enums.ParameterIn; @@ -74,7 +74,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springdoc.api.mixins.SortedOpenAPIMixin; +import org.springdoc.api.mixins.SortedOpenAPIMixin31; import org.springdoc.api.mixins.SortedSchemaMixin; +import org.springdoc.api.mixins.SortedSchemaMixin31; import org.springdoc.core.AbstractRequestService; import org.springdoc.core.GenericParameterService; import org.springdoc.core.GenericResponseService; @@ -82,6 +84,7 @@ import org.springdoc.core.OpenAPIService; import org.springdoc.core.OperationService; import org.springdoc.core.SpringDocConfigProperties; +import org.springdoc.core.SpringDocConfigProperties.ApiDocs.OpenApiVersion; import org.springdoc.core.SpringDocConfigProperties.GroupConfig; import org.springdoc.core.SpringDocProviders; import org.springdoc.core.annotations.RouterOperations; @@ -315,6 +318,8 @@ protected synchronized OpenAPI getOpenApi(Locale locale) { Map findControllerAdvice = openAPIService.getControllerAdviceMap(); // calculate generic responses openApi = openAPIService.getCalculatedOpenAPI(); + if (OpenApiVersion.OPENAPI_3_1 == springDocConfigProperties.getApiDocs().getVersion()) + openApi.openapi(OpenApiVersion.OPENAPI_3_1.getVersion()); if (springDocConfigProperties.isDefaultOverrideWithGenericResponse()) { if (!CollectionUtils.isEmpty(mappingsMap)) findControllerAdvice.putAll(mappingsMap); @@ -341,8 +346,8 @@ protected synchronized OpenAPI getOpenApi(Locale locale) { List servers = openApi.getServers(); List serversCopy = null; try { - serversCopy = Json.mapper() - .readValue(Json.mapper().writeValueAsString(servers), new TypeReference>() {}); + serversCopy = springDocProviders.jsonMapper() + .readValue(springDocProviders.jsonMapper().writeValueAsString(servers), new TypeReference>() {}); } catch (JsonProcessingException e) { LOGGER.warn("Json Processing Exception occurred: {}", e.getMessage()); @@ -610,7 +615,7 @@ protected void calculatePath(RouterOperation routerOperation, Locale locale) { * @param locale the locale */ protected void calculatePath(HandlerMethod handlerMethod, String operationPath, - Set requestMethods,String[] consumes, String[] produces, String[] headers, Locale locale) { + Set requestMethods, String[] consumes, String[] produces, String[] headers, Locale locale) { this.calculatePath(handlerMethod, new RouterOperation(operationPath, requestMethods.toArray(new RequestMethod[requestMethods.size()]), consumes, produces, headers), locale); } @@ -837,7 +842,7 @@ protected Set getDefaultAllowedHttpMethods() { * @return the operation */ protected Operation customiseOperation(Operation operation, HandlerMethod handlerMethod) { - if(operationCustomizers.isPresent()){ + if (operationCustomizers.isPresent()) { List operationCustomizerList = operationCustomizers.get(); for (OperationCustomizer operationCustomizer : operationCustomizerList) operation = operationCustomizer.customize(operation, handlerMethod); @@ -1172,7 +1177,7 @@ protected void initOpenAPIBuilder(Locale locale) { */ protected String writeYamlValue(OpenAPI openAPI) throws JsonProcessingException { String result; - ObjectMapper objectMapper = Yaml.mapper(); + ObjectMapper objectMapper = springDocProviders.yamlMapper(); if (springDocConfigProperties.isWriterWithOrderByKeys()) sortOutput(objectMapper); YAMLFactory factory = (YAMLFactory) objectMapper.getFactory(); @@ -1243,7 +1248,7 @@ protected boolean isActuatorRestController(String operationPath, HandlerMethod h */ protected String writeJsonValue(OpenAPI openAPI) throws JsonProcessingException { String result; - ObjectMapper objectMapper = Json.mapper(); + ObjectMapper objectMapper = springDocProviders.jsonMapper(); if (springDocConfigProperties.isWriterWithOrderByKeys()) sortOutput(objectMapper); if (!springDocConfigProperties.isWriterWithDefaultPrettyPrinter()) @@ -1322,8 +1327,13 @@ enum ConditionType { private void sortOutput(ObjectMapper objectMapper) { objectMapper.configure(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS, true); objectMapper.configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, true); - objectMapper.addMixIn(OpenAPI.class, SortedOpenAPIMixin.class); - objectMapper.addMixIn(Schema.class, SortedSchemaMixin.class); + if (OpenApiVersion.OPENAPI_3_1 == springDocConfigProperties.getApiDocs().getVersion()){ + objectMapper.addMixIn(OpenAPI.class, SortedOpenAPIMixin31.class); + objectMapper.addMixIn(Schema.class, SortedSchemaMixin31.class); + } else { + objectMapper.addMixIn(OpenAPI.class, SortedOpenAPIMixin.class); + objectMapper.addMixIn(Schema.class, SortedSchemaMixin.class); + } } /** diff --git a/springdoc-openapi-common/src/main/java/org/springdoc/api/mixins/SortedOpenAPIMixin31.java b/springdoc-openapi-common/src/main/java/org/springdoc/api/mixins/SortedOpenAPIMixin31.java new file mode 100644 index 000000000..014654733 --- /dev/null +++ b/springdoc-openapi-common/src/main/java/org/springdoc/api/mixins/SortedOpenAPIMixin31.java @@ -0,0 +1,53 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package org.springdoc.api.mixins; + +import java.util.Map; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import io.swagger.v3.core.jackson.PathsSerializer; +import io.swagger.v3.oas.models.Paths; + +/** + * @author bnasslashen + */ +@JsonPropertyOrder(value = {"openapi", "info", "externalDocs", "servers", "security", "tags", "paths", "components", "webhooks"}, alphabetic = true) +public interface SortedOpenAPIMixin31 { + + @JsonAnyGetter + @JsonInclude(value = Include.ALWAYS) + @JsonPropertyOrder(alphabetic = true) + Map getExtensions(); + + @JsonAnySetter + void addExtension(String name, Object value); + + @JsonSerialize(using = PathsSerializer.class) + Paths getPaths(); + +} \ No newline at end of file diff --git a/springdoc-openapi-common/src/main/java/org/springdoc/api/mixins/SortedSchemaMixin31.java b/springdoc-openapi-common/src/main/java/org/springdoc/api/mixins/SortedSchemaMixin31.java new file mode 100644 index 000000000..611c0e5ef --- /dev/null +++ b/springdoc-openapi-common/src/main/java/org/springdoc/api/mixins/SortedSchemaMixin31.java @@ -0,0 +1,82 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package org.springdoc.api.mixins; + +import java.math.BigDecimal; +import java.util.Map; +import java.util.Set; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * @author bnasslashen + */ +@JsonPropertyOrder(value = {"type", "format"}, alphabetic = true) +public interface SortedSchemaMixin31 { + + @JsonAnyGetter + @JsonPropertyOrder(alphabetic = true) + Map getExtensions(); + + @JsonIgnore + Map getJsonSchema(); + + @JsonIgnore + Boolean getNullable(); + + @JsonIgnore + Boolean getExclusiveMinimum(); + + @JsonIgnore + Boolean getExclusiveMaximum(); + + @JsonProperty("exclusiveMinimum") + BigDecimal getExclusiveMinimumValue(); + + @JsonProperty("exclusiveMaximum") + BigDecimal getExclusiveMaximumValue(); + + @JsonIgnore + String getType(); + + @JsonProperty("type") + Set getTypes(); + + @JsonAnySetter + void addExtension(String name, Object value); + + @JsonIgnore + boolean getExampleSetFlag(); + + @JsonInclude(JsonInclude.Include.CUSTOM) + Object getExample(); + + @JsonIgnore + Object getJsonSchemaImpl(); + +} \ No newline at end of file diff --git a/springdoc-openapi-common/src/main/java/org/springdoc/core/GenericParameterService.java b/springdoc-openapi-common/src/main/java/org/springdoc/core/GenericParameterService.java index c2fc98cd4..d8e09072c 100644 --- a/springdoc-openapi-common/src/main/java/org/springdoc/core/GenericParameterService.java +++ b/springdoc-openapi-common/src/main/java/org/springdoc/core/GenericParameterService.java @@ -34,7 +34,6 @@ import com.fasterxml.jackson.annotation.JsonView; import io.swagger.v3.core.util.AnnotationsUtils; -import io.swagger.v3.core.util.Json; import io.swagger.v3.core.util.PrimitiveType; import io.swagger.v3.oas.annotations.enums.Explode; import io.swagger.v3.oas.annotations.media.ExampleObject; @@ -50,6 +49,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springdoc.core.customizers.DelegatingMethodParameterCustomizer; +import org.springdoc.core.providers.ObjectMapperProvider; import org.springdoc.core.providers.WebConversionServiceProvider; import org.springframework.beans.factory.config.BeanExpressionContext; @@ -110,18 +110,26 @@ public class GenericParameterService { */ private ConfigurableBeanFactory configurableBeanFactory; + /** + * The Object mapper provider. + */ + private final ObjectMapperProvider objectMapperProvider; + /** * Instantiates a new Generic parameter builder. * @param propertyResolverUtils the property resolver utils * @param optionalDelegatingMethodParameterCustomizer the optional delegating method parameter customizer - * @param optionalWebConversionServiceProvider + * @param optionalWebConversionServiceProvider the optional web conversion service provider + * @param objectMapperProvider the object mapper provider */ - public GenericParameterService(PropertyResolverUtils propertyResolverUtils, Optional optionalDelegatingMethodParameterCustomizer, Optional optionalWebConversionServiceProvider) { + public GenericParameterService(PropertyResolverUtils propertyResolverUtils, Optional optionalDelegatingMethodParameterCustomizer, + Optional optionalWebConversionServiceProvider, ObjectMapperProvider objectMapperProvider) { this.propertyResolverUtils = propertyResolverUtils; this.optionalDelegatingMethodParameterCustomizer = optionalDelegatingMethodParameterCustomizer; this.optionalWebConversionServiceProvider = optionalWebConversionServiceProvider; this.configurableBeanFactory = propertyResolverUtils.getFactory(); this.expressionContext = (configurableBeanFactory != null ? new BeanExpressionContext(configurableBeanFactory, new RequestScope()) : null); + this.objectMapperProvider = objectMapperProvider; } /** @@ -232,7 +240,7 @@ public Parameter buildParameterFromDoc(io.swagger.v3.oas.annotations.Parameter p parameter.setIn(parameterDoc.in().toString()); if (StringUtils.isNotBlank(parameterDoc.example())) { try { - parameter.setExample(Json.mapper().readTree(parameterDoc.example())); + parameter.setExample(objectMapperProvider.jsonMapper().readTree(parameterDoc.example())); } catch (IOException e) { parameter.setExample(parameterDoc.example()); @@ -294,7 +302,7 @@ private void setSchema(io.swagger.v3.oas.annotations.Parameter parameterDoc, Com schema = AnnotationsUtils.getSchema(parameterDoc.schema(), parameterDoc.array(), true, parameterDoc.array().schema().implementation(), components, jsonView).orElse(null); // default value not set by swagger-core for array ! if (schema != null) { - Object defaultValue = SpringDocAnnotationsUtils.resolveDefaultValue(parameterDoc.array().arraySchema().defaultValue()); + Object defaultValue = SpringDocAnnotationsUtils.resolveDefaultValue(parameterDoc.array().arraySchema().defaultValue(), objectMapperProvider.jsonMapper()); schema.setDefault(defaultValue); } } @@ -524,6 +532,8 @@ public Optional getOptionalWebConversionServicePro /** * Resolve the given annotation-specified value, * potentially containing placeholders and expressions. + * @param value the value + * @return the object */ public Object resolveEmbeddedValuesAndExpressions(String value) { if (this.configurableBeanFactory == null || this.expressionContext == null) { diff --git a/springdoc-openapi-common/src/main/java/org/springdoc/core/SpringDocAnnotationsUtils.java b/springdoc-openapi-common/src/main/java/org/springdoc/core/SpringDocAnnotationsUtils.java index 95e68b156..27f990d50 100644 --- a/springdoc-openapi-common/src/main/java/org/springdoc/core/SpringDocAnnotationsUtils.java +++ b/springdoc-openapi-common/src/main/java/org/springdoc/core/SpringDocAnnotationsUtils.java @@ -32,11 +32,11 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonView; +import com.fasterxml.jackson.databind.ObjectMapper; import io.swagger.v3.core.converter.AnnotatedType; import io.swagger.v3.core.converter.ModelConverters; import io.swagger.v3.core.converter.ResolvedSchema; import io.swagger.v3.core.util.AnnotationsUtils; -import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.annotations.Hidden; import io.swagger.v3.oas.annotations.media.ExampleObject; import io.swagger.v3.oas.models.Components; @@ -376,11 +376,11 @@ private static boolean isArray(io.swagger.v3.oas.annotations.media.Content annot return isArray; } - public static Object resolveDefaultValue(String defaultValueStr) { + public static Object resolveDefaultValue(String defaultValueStr, ObjectMapper objectMapper) { Object defaultValue = null; if (StringUtils.isNotEmpty(defaultValueStr)) { try { - defaultValue = Json.mapper().readTree(defaultValueStr); + defaultValue = objectMapper.readTree(defaultValueStr); } catch (IOException e) { defaultValue = defaultValueStr; diff --git a/springdoc-openapi-common/src/main/java/org/springdoc/core/SpringDocConfigProperties.java b/springdoc-openapi-common/src/main/java/org/springdoc/core/SpringDocConfigProperties.java index 7805b0807..9d889a8ce 100644 --- a/springdoc-openapi-common/src/main/java/org/springdoc/core/SpringDocConfigProperties.java +++ b/springdoc-openapi-common/src/main/java/org/springdoc/core/SpringDocConfigProperties.java @@ -579,7 +579,7 @@ public void setDefaultProducesMediaType(String defaultProducesMediaType) { * * @return the boolean */ - public Boolean isOverrideWithGenericResponse() { + public boolean isOverrideWithGenericResponse() { return overrideWithGenericResponse != null && overrideWithGenericResponse; } @@ -915,6 +915,11 @@ public static class ApiDocs { */ private Groups groups = new Groups(); + /** + * The OpenAPI version. + */ + private OpenApiVersion version; + /** * Gets path. * @@ -986,8 +991,64 @@ public boolean isResolveSchemaProperties() { public void setResolveSchemaProperties(boolean resolveSchemaProperties) { this.resolveSchemaProperties = resolveSchemaProperties; } + + /** + * Gets version. + * + * @return the version + */ + public OpenApiVersion getVersion() { + return version; + } + + /** + * Sets version. + * + * @param version the version + */ + public void setVersion(OpenApiVersion version) { + this.version = version; + } + + /** + * The enum OpenApiVersion. + */ + public enum OpenApiVersion { + /** + *Openapi 3.0.1 version. + */ + OPENAPI_3_0("3.0.1"), + /** + *Openapi 3.1.0 version. + */ + OPENAPI_3_1("3.1.0"); + + /** + * The Open api version. + */ + private String version; + + /** + * Instantiates a new OpenApiVersion. + * + * @param openApiVersion the open api version + */ + OpenApiVersion(String openApiVersion) { + this.version = openApiVersion; + } + + /** + * Gets open api version. + * + * @return the open api version + */ + public String getVersion() { + return version; + } + } } + /** * The type Groups. * @author bnasslahsen diff --git a/springdoc-openapi-common/src/main/java/org/springdoc/core/SpringDocConfiguration.java b/springdoc-openapi-common/src/main/java/org/springdoc/core/SpringDocConfiguration.java index 508a10300..e65683a2d 100644 --- a/springdoc-openapi-common/src/main/java/org/springdoc/core/SpringDocConfiguration.java +++ b/springdoc-openapi-common/src/main/java/org/springdoc/core/SpringDocConfiguration.java @@ -58,6 +58,7 @@ import org.springdoc.core.providers.ActuatorProvider; import org.springdoc.core.providers.CloudFunctionProvider; import org.springdoc.core.providers.JavadocProvider; +import org.springdoc.core.providers.ObjectMapperProvider; import org.springdoc.core.providers.RepositoryRestConfigurationProvider; import org.springdoc.core.providers.RepositoryRestResourceProvider; import org.springdoc.core.providers.RouterFunctionProvider; @@ -142,12 +143,13 @@ LocalVariableTableParameterNameDiscoverer localSpringDocParameterNameDiscoverer( /** * Additional models converter additional models converter. * + * @param objectMapperProvider the object mapper provider * @return the additional models converter */ @Bean @Lazy(false) - AdditionalModelsConverter additionalModelsConverter() { - return new AdditionalModelsConverter(); + AdditionalModelsConverter additionalModelsConverter(ObjectMapperProvider objectMapperProvider) { + return new AdditionalModelsConverter(objectMapperProvider); } /** @@ -165,25 +167,27 @@ PropertyCustomizingConverter propertyCustomizingConverter(Optional optionalDelegatingMethodParameterCustomizer, - Optional optionalWebConversionServiceProvider) { + Optional optionalWebConversionServiceProvider, ObjectMapperProvider objectMapperProvider) { return new GenericParameterService(propertyResolverUtils, optionalDelegatingMethodParameterCustomizer, - optionalWebConversionServiceProvider); + optionalWebConversionServiceProvider, objectMapperProvider); } /** @@ -388,14 +396,17 @@ static BeanFactoryPostProcessor springdocBeanFactoryPostProcessor2() { * @param repositoryRestResourceProvider the repository rest resource provider * @param routerFunctionProvider the router function provider * @param springWebProvider the spring web provider + * @param objectMapperProvider the object mapper provider * @return the spring doc providers */ @Bean @ConditionalOnMissingBean @Lazy(false) SpringDocProviders springDocProviders(Optional actuatorProvider, Optional springCloudFunctionProvider, Optional springSecurityOAuth2Provider, - Optional repositoryRestResourceProvider, Optional routerFunctionProvider, Optional springWebProvider) { - return new SpringDocProviders(actuatorProvider, springCloudFunctionProvider, springSecurityOAuth2Provider, repositoryRestResourceProvider, routerFunctionProvider, springWebProvider); + Optional repositoryRestResourceProvider, Optional routerFunctionProvider, + Optional springWebProvider, Optional webConversionServiceProvider, + ObjectMapperProvider objectMapperProvider) { + return new SpringDocProviders(actuatorProvider, springCloudFunctionProvider, springSecurityOAuth2Provider, repositoryRestResourceProvider, routerFunctionProvider, springWebProvider, webConversionServiceProvider, objectMapperProvider); } /** @@ -496,16 +507,17 @@ static class SpringDocPageableConfiguration { /** * Pageable open api converter pageable open api converter. * + * @param objectMapperProvider the object mapper provider * @return the pageable open api converter */ @Bean @ConditionalOnMissingBean @ConditionalOnProperty(name = SPRINGDOC_PAGEABLE_CONVERTER_ENABLED, matchIfMissing = true) @Lazy(false) - PageableOpenAPIConverter pageableOpenAPIConverter() { + PageableOpenAPIConverter pageableOpenAPIConverter(ObjectMapperProvider objectMapperProvider) { getConfig().replaceParameterObjectWithClass(org.springframework.data.domain.Pageable.class, org.springdoc.core.converters.models.Pageable.class) .replaceParameterObjectWithClass(org.springframework.data.domain.PageRequest.class, org.springdoc.core.converters.models.Pageable.class); - return new PageableOpenAPIConverter(); + return new PageableOpenAPIConverter(objectMapperProvider); } /** @@ -572,15 +584,27 @@ static class SpringDocFunctionCatalogConfiguration { * Spring cloud function provider spring cloud function provider. * * @param functionCatalog the function catalog - * @param genericResponseService the generic response service * @param springDocConfigProperties the spring doc config properties * @return the spring cloud function provider */ @Bean @ConditionalOnMissingBean @Lazy(false) - CloudFunctionProvider springCloudFunctionProvider(Optional functionCatalog, GenericResponseService genericResponseService, SpringDocConfigProperties springDocConfigProperties) { - return new SpringCloudFunctionProvider(functionCatalog, genericResponseService, springDocConfigProperties); + CloudFunctionProvider springCloudFunctionProvider(Optional functionCatalog, SpringDocConfigProperties springDocConfigProperties) { + return new SpringCloudFunctionProvider(functionCatalog, springDocConfigProperties); } } + + /** + * Object mapper provider object mapper provider. + * + * @param springDocConfigProperties the spring doc config properties + * @return the object mapper provider + */ + @Bean + @ConditionalOnMissingBean + @Lazy(false) + ObjectMapperProvider objectMapperProvider(SpringDocConfigProperties springDocConfigProperties){ + return new ObjectMapperProvider(springDocConfigProperties); + } } \ No newline at end of file diff --git a/springdoc-openapi-common/src/main/java/org/springdoc/core/SpringDocProviders.java b/springdoc-openapi-common/src/main/java/org/springdoc/core/SpringDocProviders.java index 23d787531..a4b7e6ff7 100644 --- a/springdoc-openapi-common/src/main/java/org/springdoc/core/SpringDocProviders.java +++ b/springdoc-openapi-common/src/main/java/org/springdoc/core/SpringDocProviders.java @@ -21,12 +21,15 @@ import java.util.Optional; +import com.fasterxml.jackson.databind.ObjectMapper; import org.springdoc.core.providers.ActuatorProvider; import org.springdoc.core.providers.CloudFunctionProvider; +import org.springdoc.core.providers.ObjectMapperProvider; import org.springdoc.core.providers.RepositoryRestResourceProvider; import org.springdoc.core.providers.RouterFunctionProvider; import org.springdoc.core.providers.SecurityOAuth2Provider; import org.springdoc.core.providers.SpringWebProvider; +import org.springdoc.core.providers.WebConversionServiceProvider; /** * The type Spring doc providers. @@ -64,6 +67,16 @@ public class SpringDocProviders { */ private final Optional springWebProvider; + /** + * The Web conversion service. + */ + private final Optional optionalWebConversionServiceProvider; + + /** + * The Object mapper provider. + */ + private final ObjectMapperProvider objectMapperProvider; + /** * Instantiates a new Spring doc providers. * @param actuatorProvider the actuator provider @@ -72,16 +85,22 @@ public class SpringDocProviders { * @param repositoryRestResourceProvider the repository rest resource provider * @param routerFunctionProvider the router function provider * @param springWebProvider the spring web provider + * @param optionalWebConversionServiceProvider the optional web conversion service provider + * @param objectMapperProvider the object mapper provider */ public SpringDocProviders(Optional actuatorProvider, Optional springCloudFunctionProvider, Optional springSecurityOAuth2Provider, Optional repositoryRestResourceProvider, - Optional routerFunctionProvider, Optional springWebProvider) { + Optional routerFunctionProvider, Optional springWebProvider, + Optional optionalWebConversionServiceProvider, + ObjectMapperProvider objectMapperProvider) { this.actuatorProvider = actuatorProvider; this.springCloudFunctionProvider = springCloudFunctionProvider; this.springSecurityOAuth2Provider = springSecurityOAuth2Provider; this.repositoryRestResourceProvider = repositoryRestResourceProvider; this.routerFunctionProvider = routerFunctionProvider; this.springWebProvider = springWebProvider; + this.optionalWebConversionServiceProvider = optionalWebConversionServiceProvider; + this.objectMapperProvider = objectMapperProvider; } /** @@ -137,4 +156,31 @@ public Optional getRouterFunctionProvider() { public Optional getSpringWebProvider() { return springWebProvider; } + + /** + * Gets optional web conversion service provider. + * + * @return the optional web conversion service provider + */ + public Optional getOptionalWebConversionServiceProvider() { + return optionalWebConversionServiceProvider; + } + + /** + * Json mapper object mapper. + * + * @return the object mapper provider + */ + public ObjectMapper jsonMapper() { + return objectMapperProvider.jsonMapper(); + } + + /** + * Yaml mapper object mapper. + * + * @return the object mapper + */ + public ObjectMapper yamlMapper() { + return objectMapperProvider.yamlMapper(); + } } diff --git a/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/AdditionalModelsConverter.java b/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/AdditionalModelsConverter.java index 9ad46874b..4223bfcac 100644 --- a/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/AdditionalModelsConverter.java +++ b/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/AdditionalModelsConverter.java @@ -28,8 +28,8 @@ import io.swagger.v3.core.converter.AnnotatedType; import io.swagger.v3.core.converter.ModelConverter; import io.swagger.v3.core.converter.ModelConverterContext; -import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.models.media.Schema; +import org.springdoc.core.providers.ObjectMapperProvider; /** * The type Additional models converter. @@ -52,6 +52,20 @@ public class AdditionalModelsConverter implements ModelConverter { */ private static final Map paramObjectReplacementMap = new HashMap<>(); + /** + * The Spring doc object mapper. + */ + private final ObjectMapperProvider springDocObjectMapper; + + /** + * Instantiates a new Additional models converter. + * + * @param springDocObjectMapper the spring doc object mapper + */ + public AdditionalModelsConverter(ObjectMapperProvider springDocObjectMapper) { + this.springDocObjectMapper = springDocObjectMapper; + } + /** * Replace with class. * @@ -112,7 +126,7 @@ public static void disableReplacement(Class clazz) { */ @Override public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator chain) { - JavaType javaType = Json.mapper().constructType(type.getType()); + JavaType javaType = springDocObjectMapper.jsonMapper().constructType(type.getType()); if (javaType != null) { Class cls = javaType.getRawClass(); if (modelToSchemaMap.containsKey(cls)) diff --git a/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/FileSupportConverter.java b/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/FileSupportConverter.java index c93ffb6ca..5d6ae0432 100644 --- a/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/FileSupportConverter.java +++ b/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/FileSupportConverter.java @@ -27,9 +27,9 @@ import io.swagger.v3.core.converter.AnnotatedType; import io.swagger.v3.core.converter.ModelConverter; import io.swagger.v3.core.converter.ModelConverterContext; -import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.models.media.FileSchema; import io.swagger.v3.oas.models.media.Schema; +import org.springdoc.core.providers.ObjectMapperProvider; import static org.springdoc.core.GenericParameterService.isFile; @@ -39,9 +39,23 @@ */ public class FileSupportConverter implements ModelConverter { + /** + * The Spring doc object mapper. + */ + private final ObjectMapperProvider springDocObjectMapper; + + /** + * Instantiates a new File support converter. + * + * @param springDocObjectMapper the spring doc object mapper + */ + public FileSupportConverter(ObjectMapperProvider springDocObjectMapper) { + this.springDocObjectMapper = springDocObjectMapper; + } + @Override public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator chain) { - JavaType javaType = Json.mapper().constructType(type.getType()); + JavaType javaType = springDocObjectMapper.jsonMapper().constructType(type.getType()); if (javaType != null) { Class cls = javaType.getRawClass(); if (isFile(cls)) diff --git a/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/PageableOpenAPIConverter.java b/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/PageableOpenAPIConverter.java index 8b2e9e9c2..5a8566b45 100644 --- a/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/PageableOpenAPIConverter.java +++ b/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/PageableOpenAPIConverter.java @@ -26,10 +26,10 @@ import io.swagger.v3.core.converter.AnnotatedType; import io.swagger.v3.core.converter.ModelConverter; import io.swagger.v3.core.converter.ModelConverterContext; -import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.springdoc.core.converters.models.Pageable; +import org.springdoc.core.providers.ObjectMapperProvider; /** * The Pageable Type models converter. @@ -52,6 +52,20 @@ public class PageableOpenAPIConverter implements ModelConverter { */ private static final AnnotatedType PAGEABLE = new AnnotatedType(Pageable.class).resolveAsRef(true); + /** + * The Spring doc object mapper. + */ + private final ObjectMapperProvider springDocObjectMapper; + + /** + * Instantiates a new Pageable open api converter. + * + * @param springDocObjectMapper the spring doc object mapper + */ + public PageableOpenAPIConverter(ObjectMapperProvider springDocObjectMapper) { + this.springDocObjectMapper = springDocObjectMapper; + } + /** * Resolve schema. * @@ -62,7 +76,7 @@ public class PageableOpenAPIConverter implements ModelConverter { */ @Override public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator chain) { - JavaType javaType = Json.mapper().constructType(type.getType()); + JavaType javaType = springDocObjectMapper.jsonMapper().constructType(type.getType()); if (javaType != null) { Class cls = javaType.getRawClass(); if (PAGEABLE_TO_REPLACE.equals(cls.getCanonicalName()) || PAGE_REQUEST_TO_REPLACE.equals(cls.getCanonicalName())) { diff --git a/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/PolymorphicModelConverter.java b/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/PolymorphicModelConverter.java index c9ecdb07a..7810a10b0 100644 --- a/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/PolymorphicModelConverter.java +++ b/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/PolymorphicModelConverter.java @@ -31,15 +31,30 @@ import io.swagger.v3.core.converter.ModelConverter; import io.swagger.v3.core.converter.ModelConverterContext; import io.swagger.v3.core.util.AnnotationsUtils; -import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.models.media.ComposedSchema; import io.swagger.v3.oas.models.media.Schema; +import org.springdoc.core.providers.ObjectMapperProvider; /** * The type Polymorphic model converter. * @author bnasslahsen */ public class PolymorphicModelConverter implements ModelConverter { + + /** + * The Spring doc object mapper. + */ + private final ObjectMapperProvider springDocObjectMapper; + + /** + * Instantiates a new Polymorphic model converter. + * + * @param springDocObjectMapper the spring doc object mapper + */ + public PolymorphicModelConverter(ObjectMapperProvider springDocObjectMapper) { + this.springDocObjectMapper = springDocObjectMapper; + } + @Override public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator chain) { if (chain.hasNext()) { @@ -82,7 +97,7 @@ private Schema composePolymorphicSchema(AnnotatedType type, Schema schema, Colle * @return the boolean */ private boolean isConcreteClass(AnnotatedType type) { - JavaType javaType = Json.mapper().constructType(type.getType()); + JavaType javaType = springDocObjectMapper.jsonMapper().constructType(type.getType()); Class clazz = javaType.getRawClass(); return !Modifier.isAbstract(clazz.getModifiers()) && !clazz.isInterface(); } diff --git a/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/RequestTypeToIgnoreConverter.java b/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/RequestTypeToIgnoreConverter.java index 7e6513815..b27321d47 100644 --- a/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/RequestTypeToIgnoreConverter.java +++ b/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/RequestTypeToIgnoreConverter.java @@ -26,9 +26,9 @@ import io.swagger.v3.core.converter.AnnotatedType; import io.swagger.v3.core.converter.ModelConverter; import io.swagger.v3.core.converter.ModelConverterContext; -import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.models.media.Schema; import org.springdoc.core.AbstractRequestService; +import org.springdoc.core.providers.ObjectMapperProvider; /** * The type Request type to ignore converter. @@ -36,10 +36,24 @@ */ public class RequestTypeToIgnoreConverter implements ModelConverter { + /** + * The Spring doc object mapper. + */ + private final ObjectMapperProvider springDocObjectMapper; + + /** + * Instantiates a new Request type to ignore converter. + * + * @param springDocObjectMapper the spring doc object mapper + */ + public RequestTypeToIgnoreConverter(ObjectMapperProvider springDocObjectMapper) { + this.springDocObjectMapper = springDocObjectMapper; + } + @Override public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator chain) { if (type.isSchemaProperty()) { - JavaType javaType = Json.mapper().constructType(type.getType()); + JavaType javaType = springDocObjectMapper.jsonMapper().constructType(type.getType()); Class cls = javaType.getRawClass(); if (AbstractRequestService.isRequestTypeToIgnore(cls)) return null; diff --git a/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/ResponseSupportConverter.java b/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/ResponseSupportConverter.java index acab1fff3..41b2f20c7 100644 --- a/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/ResponseSupportConverter.java +++ b/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/ResponseSupportConverter.java @@ -27,9 +27,9 @@ import io.swagger.v3.core.converter.AnnotatedType; import io.swagger.v3.core.converter.ModelConverter; import io.swagger.v3.core.converter.ModelConverterContext; -import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; +import org.springdoc.core.providers.ObjectMapperProvider; import static org.springdoc.core.converters.ConverterUtils.isFluxTypeWrapper; import static org.springdoc.core.converters.ConverterUtils.isResponseTypeToIgnore; @@ -41,9 +41,23 @@ */ public class ResponseSupportConverter implements ModelConverter { + /** + * The Spring doc object mapper. + */ + private final ObjectMapperProvider springDocObjectMapper; + + /** + * Instantiates a new Response support converter. + * + * @param springDocObjectMapper the spring doc object mapper + */ + public ResponseSupportConverter(ObjectMapperProvider springDocObjectMapper) { + this.springDocObjectMapper = springDocObjectMapper; + } + @Override public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator chain) { - JavaType javaType = Json.mapper().constructType(type.getType()); + JavaType javaType = springDocObjectMapper.jsonMapper().constructType(type.getType()); if (javaType != null) { Class cls = javaType.getRawClass(); if (isResponseTypeWrapper(cls) && !isFluxTypeWrapper(cls)) { diff --git a/springdoc-openapi-common/src/main/java/org/springdoc/core/providers/ObjectMapperProvider.java b/springdoc-openapi-common/src/main/java/org/springdoc/core/providers/ObjectMapperProvider.java new file mode 100644 index 000000000..0d9382193 --- /dev/null +++ b/springdoc-openapi-common/src/main/java/org/springdoc/core/providers/ObjectMapperProvider.java @@ -0,0 +1,89 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package org.springdoc.core.providers; + +import com.fasterxml.jackson.databind.ObjectMapper; +import io.swagger.v3.core.util.Json; +import io.swagger.v3.core.util.Json31; +import io.swagger.v3.core.util.Yaml; +import io.swagger.v3.core.util.Yaml31; +import org.springdoc.core.SpringDocConfigProperties; +import org.springdoc.core.SpringDocConfigProperties.ApiDocs.OpenApiVersion; + +/** + * The type Spring doc object mapper provider. + */ +public class ObjectMapperProvider { + + /** + * The Json mapper. + */ + private final ObjectMapper jsonMapper; + + /** + * The Yaml mapper. + */ + private final ObjectMapper yamlMapper; + + /** + * The Spring doc config properties. + */ + private final SpringDocConfigProperties springDocConfigProperties; + + + /** + * Instantiates a new Spring doc object mapper. + * + * @param springDocConfigProperties the spring doc config properties + */ + public ObjectMapperProvider(SpringDocConfigProperties springDocConfigProperties) { + this.springDocConfigProperties = springDocConfigProperties; + OpenApiVersion openApiVersion = springDocConfigProperties.getApiDocs().getVersion(); + if (openApiVersion == OpenApiVersion.OPENAPI_3_1) { + jsonMapper = Json31.mapper(); + yamlMapper = Yaml31.mapper(); + } + else { + jsonMapper = Json.mapper(); + yamlMapper = Yaml.mapper(); + } + } + + /** + * Mapper object mapper. + * + * @return the object mapper + */ + public ObjectMapper jsonMapper() { + return jsonMapper; + } + + /** + * Yaml mapper object mapper. + * + * @return the object mapper + */ + public ObjectMapper yamlMapper() { + return yamlMapper; + } +} diff --git a/springdoc-openapi-common/src/main/java/org/springdoc/core/providers/SpringCloudFunctionProvider.java b/springdoc-openapi-common/src/main/java/org/springdoc/core/providers/SpringCloudFunctionProvider.java index 609a924d8..467cdfe8d 100644 --- a/springdoc-openapi-common/src/main/java/org/springdoc/core/providers/SpringCloudFunctionProvider.java +++ b/springdoc-openapi-common/src/main/java/org/springdoc/core/providers/SpringCloudFunctionProvider.java @@ -51,11 +51,6 @@ public class SpringCloudFunctionProvider implements CloudFunctionProvider, Appli */ private final Optional functionCatalogOptional; - /** - * The Generic response service. - */ - private final GenericResponseService genericResponseService; - /** * The Spring doc config properties. */ @@ -95,17 +90,16 @@ public class SpringCloudFunctionProvider implements CloudFunctionProvider, Appli /** * Instantiates a new Spring cloud function provider. * @param functionCatalogOptional the function catalog - * @param genericResponseService the generic response service * @param springDocConfigProperties the spring doc config properties */ - public SpringCloudFunctionProvider(Optional functionCatalogOptional, GenericResponseService genericResponseService, SpringDocConfigProperties springDocConfigProperties) { + public SpringCloudFunctionProvider(Optional functionCatalogOptional, SpringDocConfigProperties springDocConfigProperties) { this.functionCatalogOptional = functionCatalogOptional; - this.genericResponseService = genericResponseService; this.springDocConfigProperties = springDocConfigProperties; } @Override public List getRouterOperations(OpenAPI openAPI) { + GenericResponseService genericResponseService = applicationContext.getBean(GenericResponseService.class); List routerOperationList = new ArrayList<>(); functionCatalogOptional.ifPresent( functionCatalog -> { @@ -117,7 +111,7 @@ public List getRouterOperations(OpenAPI openAPI) { for (RequestMethod requestMethod : functionRequestMethods) { RouterOperation routerOperation = buildRouterOperation(name, " function", requestMethod, routerOperationList); buildRequest(openAPI, name, function, requestMethod, routerOperation); - ApiResponses apiResponses = buildResponses(openAPI, function, defaultMediaTypes); + ApiResponses apiResponses = buildResponses(openAPI, function, defaultMediaTypes, genericResponseService); routerOperation.getOperationModel().responses(apiResponses); if (StringUtils.isEmpty(prefix)) { if (GET.equals(requestMethod)) @@ -145,28 +139,14 @@ else if (function.isConsumer()) { ApiResponse apiResponse = new ApiResponse(); apiResponse.setContent(new Content()); apiResponses.put(String.valueOf(HttpStatus.ACCEPTED.value()), apiResponse.description(HttpStatus.ACCEPTED.getReasonPhrase())); - routerOperation.getOperationModel().responses(apiResponses); - if (StringUtils.isEmpty(prefix)) - routerOperation.setPath(AntPathMatcher.DEFAULT_PATH_SEPARATOR + name); - else - routerOperation.setPath(prefix + AntPathMatcher.DEFAULT_PATH_SEPARATOR + name); - RouterOperation userRouterOperation = this.getRouterFunctionPaths(name, requestMethod); - if (userRouterOperation != null) - mergeRouterOperation(routerOperation, userRouterOperation); + getRouterOperationsCommon(name, requestMethod, routerOperation, apiResponses); } } else if (function.isSupplier()) { for (RequestMethod requestMethod : supplierRequestMethods) { RouterOperation routerOperation = buildRouterOperation(name, " supplier", requestMethod, routerOperationList); - ApiResponses apiResponses = buildResponses(openAPI, function, new String[] { springDocConfigProperties.getDefaultProducesMediaType() }); - routerOperation.getOperationModel().responses(apiResponses); - if (StringUtils.isEmpty(prefix)) - routerOperation.setPath(AntPathMatcher.DEFAULT_PATH_SEPARATOR + name); - else - routerOperation.setPath(prefix + AntPathMatcher.DEFAULT_PATH_SEPARATOR + name); - RouterOperation userRouterOperation = this.getRouterFunctionPaths(name, requestMethod); - if (userRouterOperation != null) - mergeRouterOperation(routerOperation, userRouterOperation); + ApiResponses apiResponses = buildResponses(openAPI, function, new String[] { springDocConfigProperties.getDefaultProducesMediaType() }, genericResponseService); + getRouterOperationsCommon(name, requestMethod, routerOperation, apiResponses); } } } @@ -176,6 +156,25 @@ else if (function.isSupplier()) { return routerOperationList; } + /** + * Gets router operation common. + * + * @param name the name + * @param requestMethod the request method + * @param routerOperation the router operation + * @param apiResponses the api responses + */ + private void getRouterOperationsCommon(String name, RequestMethod requestMethod, RouterOperation routerOperation, ApiResponses apiResponses) { + routerOperation.getOperationModel().responses(apiResponses); + if (StringUtils.isEmpty(prefix)) + routerOperation.setPath(AntPathMatcher.DEFAULT_PATH_SEPARATOR + name); + else + routerOperation.setPath(prefix + AntPathMatcher.DEFAULT_PATH_SEPARATOR + name); + RouterOperation userRouterOperation = this.getRouterFunctionPaths(name, requestMethod); + if (userRouterOperation != null) + mergeRouterOperation(routerOperation, userRouterOperation); + } + /** * Build request. * @@ -230,9 +229,10 @@ private RouterOperation buildRouterOperation(String name, String type, RequestMe * @param openAPI the open api * @param function the function * @param mediaTypes the media types + * @param genericResponseService the generic response service * @return the api responses */ - private ApiResponses buildResponses(OpenAPI openAPI, FunctionInvocationWrapper function, String[] mediaTypes) { + private ApiResponses buildResponses(OpenAPI openAPI, FunctionInvocationWrapper function, String[] mediaTypes, GenericResponseService genericResponseService) { Type returnType = function.getOutputType(); Content content = genericResponseService.buildContent(openAPI.getComponents(), null, mediaTypes, null, returnType); ApiResponses apiResponses = new ApiResponses(); @@ -247,6 +247,7 @@ private ApiResponses buildResponses(OpenAPI openAPI, FunctionInvocationWrapper f * Gets router function paths. * * @param beanName the bean name + * @param requestMethod the request method * @return the router function paths */ protected RouterOperation getRouterFunctionPaths(String beanName, RequestMethod requestMethod) { diff --git a/springdoc-openapi-common/src/main/java/org/springdoc/ui/AbstractSwaggerIndexTransformer.java b/springdoc-openapi-common/src/main/java/org/springdoc/ui/AbstractSwaggerIndexTransformer.java index 4709f6e0e..626dde71c 100644 --- a/springdoc-openapi-common/src/main/java/org/springdoc/ui/AbstractSwaggerIndexTransformer.java +++ b/springdoc-openapi-common/src/main/java/org/springdoc/ui/AbstractSwaggerIndexTransformer.java @@ -30,12 +30,12 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import io.swagger.v3.core.util.Json; import org.apache.commons.lang3.StringUtils; import org.springdoc.core.Constants; import org.springdoc.core.SwaggerUiConfigParameters; import org.springdoc.core.SwaggerUiConfigProperties; import org.springdoc.core.SwaggerUiOAuthProperties; +import org.springdoc.core.providers.ObjectMapperProvider; import org.springframework.util.CollectionUtils; @@ -79,11 +79,11 @@ public class AbstractSwaggerIndexTransformer { * @param swaggerUiOAuthProperties the swagger ui o auth properties * @param swaggerUiConfigParameters the swagger ui config parameters */ - public AbstractSwaggerIndexTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, SwaggerUiConfigParameters swaggerUiConfigParameters) { + public AbstractSwaggerIndexTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, SwaggerUiConfigParameters swaggerUiConfigParameters, ObjectMapperProvider objectMapperProvider) { this.swaggerUiConfig = swaggerUiConfig; this.swaggerUiOAuthProperties = swaggerUiOAuthProperties; this.swaggerUiConfigParameters = swaggerUiConfigParameters; - this.objectMapper = Json.mapper(); + this.objectMapper = objectMapperProvider.jsonMapper(); } /** diff --git a/springdoc-openapi-common/src/test/java/org/springdoc/api/AbstractOpenApiResourceTest.java b/springdoc-openapi-common/src/test/java/org/springdoc/api/AbstractOpenApiResourceTest.java index 2544ebc10..eaaccd0f7 100644 --- a/springdoc-openapi-common/src/test/java/org/springdoc/api/AbstractOpenApiResourceTest.java +++ b/springdoc-openapi-common/src/test/java/org/springdoc/api/AbstractOpenApiResourceTest.java @@ -27,6 +27,7 @@ import java.util.Map; import java.util.Optional; +import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.annotations.enums.ParameterIn; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Operation; @@ -119,6 +120,7 @@ public void setUp() { when(openAPIService.getContext()).thenReturn(context); when(openAPIBuilderObjectFactory.getObject()).thenReturn(openAPIService); + when(springDocProviders.jsonMapper()).thenReturn(Json.mapper()); } @Test diff --git a/springdoc-openapi-data-rest/src/main/java/org/springdoc/data/rest/DataRestHalProvider.java b/springdoc-openapi-data-rest/src/main/java/org/springdoc/data/rest/DataRestHalProvider.java index 10dd544a3..e361bb6f9 100644 --- a/springdoc-openapi-data-rest/src/main/java/org/springdoc/data/rest/DataRestHalProvider.java +++ b/springdoc-openapi-data-rest/src/main/java/org/springdoc/data/rest/DataRestHalProvider.java @@ -27,7 +27,7 @@ import javax.annotation.PostConstruct; -import io.swagger.v3.core.util.Json; +import org.springdoc.core.providers.ObjectMapperProvider; import org.springdoc.hateoas.HateoasHalProvider; import org.springframework.boot.autoconfigure.hateoas.HateoasProperties; @@ -45,15 +45,23 @@ public class DataRestHalProvider extends HateoasHalProvider { */ private Optional repositoryRestConfigurationOptional; + /** + * The Object mapper provider. + */ + private final ObjectMapperProvider objectMapperProvider; + /** * Instantiates a new Data rest hal provider. * - * @param repositoryRestConfigurationOptional the repository rest configuration optional + * @param repositoryRestConfigurationOptional the repository rest configuration optional * @param hateoasPropertiesOptional the hateoas properties optional + * @param objectMapperProvider the object mapper provider */ - public DataRestHalProvider(Optional repositoryRestConfigurationOptional,Optional hateoasPropertiesOptional) { - super(hateoasPropertiesOptional); + public DataRestHalProvider(Optional repositoryRestConfigurationOptional,Optional hateoasPropertiesOptional, + ObjectMapperProvider objectMapperProvider) { + super(hateoasPropertiesOptional, objectMapperProvider); this.repositoryRestConfigurationOptional = repositoryRestConfigurationOptional; + this.objectMapperProvider = objectMapperProvider; } @PostConstruct @@ -61,8 +69,8 @@ public DataRestHalProvider(Optional repositoryRestC protected void init() { if (!isHalEnabled()) return; - if (!Jackson2HalModule.isAlreadyRegisteredIn(Json.mapper())) - Json.mapper().registerModule(new Jackson2HalModule()); + if (!Jackson2HalModule.isAlreadyRegisteredIn(objectMapperProvider.jsonMapper())) + objectMapperProvider.jsonMapper().registerModule(new Jackson2HalModule()); } @Override diff --git a/springdoc-openapi-data-rest/src/main/java/org/springdoc/data/rest/SpringDocDataRestConfiguration.java b/springdoc-openapi-data-rest/src/main/java/org/springdoc/data/rest/SpringDocDataRestConfiguration.java index d5594c22c..247c0f221 100644 --- a/springdoc-openapi-data-rest/src/main/java/org/springdoc/data/rest/SpringDocDataRestConfiguration.java +++ b/springdoc-openapi-data-rest/src/main/java/org/springdoc/data/rest/SpringDocDataRestConfiguration.java @@ -35,6 +35,7 @@ import org.springdoc.core.RequestBodyService; import org.springdoc.core.SpringDocConfigProperties; import org.springdoc.core.converters.models.DefaultPageable; +import org.springdoc.core.providers.ObjectMapperProvider; import org.springdoc.data.rest.core.DataRestOperationService; import org.springdoc.data.rest.core.DataRestRequestService; import org.springdoc.data.rest.core.DataRestResponseService; @@ -90,8 +91,8 @@ public class SpringDocDataRestConfiguration { @ConditionalOnMissingBean @Primary @Lazy(false) - DataRestHalProvider halProvider(Optional repositoryRestConfiguration, Optional hateoasPropertiesOptional) { - return new DataRestHalProvider(repositoryRestConfiguration, hateoasPropertiesOptional); + DataRestHalProvider halProvider(Optional repositoryRestConfiguration, Optional hateoasPropertiesOptional, ObjectMapperProvider objectMapperProvider) { + return new DataRestHalProvider(repositoryRestConfiguration, hateoasPropertiesOptional, objectMapperProvider); } diff --git a/springdoc-openapi-data-rest/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java b/springdoc-openapi-data-rest/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java index fdd13e752..6d5c09dba 100644 --- a/springdoc-openapi-data-rest/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java +++ b/springdoc-openapi-data-rest/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java @@ -26,12 +26,13 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.introspect.SimpleMixInResolver; import com.fasterxml.jackson.databind.type.ClassKey; -import io.swagger.v3.core.util.Json; import org.apache.commons.lang3.reflect.FieldUtils; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; +import org.springdoc.core.providers.ObjectMapperProvider; import test.org.springdoc.api.AbstractSpringDocTest; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.test.context.TestPropertySource; @@ -44,10 +45,13 @@ static class SpringDocTestApp {} private Map> springMixins = new HashMap<>(); + @Autowired + ObjectMapperProvider objectMapperProvider; + @BeforeEach void init() throws IllegalAccessException { Field convertersField2 = FieldUtils.getDeclaredField(ObjectMapper.class, "_mixIns", true); - SimpleMixInResolver _mixIns = (SimpleMixInResolver) convertersField2.get(Json.mapper()); + SimpleMixInResolver _mixIns = (SimpleMixInResolver) convertersField2.get(objectMapperProvider.jsonMapper()); Field convertersField3 = FieldUtils.getDeclaredField(SimpleMixInResolver.class, "_localMixIns", true); Map> _localMixIns = (Map>) convertersField3.get(_mixIns); Iterator>> it = _localMixIns.entrySet().iterator(); @@ -64,7 +68,7 @@ void init() throws IllegalAccessException { @AfterEach private void clean() throws IllegalAccessException { Field convertersField2 = FieldUtils.getDeclaredField(ObjectMapper.class, "_mixIns", true); - SimpleMixInResolver _mixIns = (SimpleMixInResolver) convertersField2.get(Json.mapper()); + SimpleMixInResolver _mixIns = (SimpleMixInResolver) convertersField2.get(objectMapperProvider.jsonMapper()); Field convertersField3 = FieldUtils.getDeclaredField(SimpleMixInResolver.class, "_localMixIns", true); Map> _localMixIns = (Map>) convertersField3.get(_mixIns); _localMixIns.putAll(springMixins); diff --git a/springdoc-openapi-groovy/src/main/java/org/springdoc/groovy/SpringDocGroovyConfiguration.java b/springdoc-openapi-groovy/src/main/java/org/springdoc/groovy/SpringDocGroovyConfiguration.java index bda53c578..d04793287 100644 --- a/springdoc-openapi-groovy/src/main/java/org/springdoc/groovy/SpringDocGroovyConfiguration.java +++ b/springdoc-openapi-groovy/src/main/java/org/springdoc/groovy/SpringDocGroovyConfiguration.java @@ -21,6 +21,7 @@ import groovy.lang.MetaClass; import org.springdoc.core.SpringDocUtils; import org.springdoc.core.converters.RequestTypeToIgnoreConverter; +import org.springdoc.core.providers.ObjectMapperProvider; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; @@ -57,7 +58,7 @@ Object ignoreGroovyMetaClass() { */ @Bean @Lazy(false) - RequestTypeToIgnoreConverter requestTypeToIgnoreConverter() { - return new RequestTypeToIgnoreConverter(); + RequestTypeToIgnoreConverter requestTypeToIgnoreConverter(ObjectMapperProvider springDocObjectMapper) { + return new RequestTypeToIgnoreConverter(springDocObjectMapper); } } diff --git a/springdoc-openapi-hateoas/src/main/java/org/springdoc/hateoas/HateoasHalProvider.java b/springdoc-openapi-hateoas/src/main/java/org/springdoc/hateoas/HateoasHalProvider.java index 1823f69f0..bb0432c83 100644 --- a/springdoc-openapi-hateoas/src/main/java/org/springdoc/hateoas/HateoasHalProvider.java +++ b/springdoc-openapi-hateoas/src/main/java/org/springdoc/hateoas/HateoasHalProvider.java @@ -24,7 +24,7 @@ import javax.annotation.PostConstruct; -import io.swagger.v3.core.util.Json; +import org.springdoc.core.providers.ObjectMapperProvider; import org.springframework.boot.autoconfigure.hateoas.HateoasProperties; import org.springframework.hateoas.mediatype.hal.Jackson2HalModule; @@ -40,13 +40,16 @@ public class HateoasHalProvider { */ private final Optional hateoasPropertiesOptional; + private final ObjectMapperProvider objectMapperProvider; + /** * Instantiates a new Hateoas hal provider. * * @param hateoasPropertiesOptional the hateoas properties optional */ - public HateoasHalProvider(Optional hateoasPropertiesOptional) { + public HateoasHalProvider(Optional hateoasPropertiesOptional, ObjectMapperProvider objectMapperProvider) { this.hateoasPropertiesOptional = hateoasPropertiesOptional; + this.objectMapperProvider = objectMapperProvider; } /** @@ -56,8 +59,8 @@ public HateoasHalProvider(Optional hateoasPropertiesOptional) protected void init() { if (!isHalEnabled()) return; - if (!Jackson2HalModule.isAlreadyRegisteredIn(Json.mapper())) - Json.mapper().registerModule(new Jackson2HalModule()); + if (!Jackson2HalModule.isAlreadyRegisteredIn(objectMapperProvider.jsonMapper())) + objectMapperProvider.jsonMapper().registerModule(new Jackson2HalModule()); } /** diff --git a/springdoc-openapi-hateoas/src/main/java/org/springdoc/hateoas/SpringDocHateoasConfiguration.java b/springdoc-openapi-hateoas/src/main/java/org/springdoc/hateoas/SpringDocHateoasConfiguration.java index d198e89e1..4b309cb5c 100644 --- a/springdoc-openapi-hateoas/src/main/java/org/springdoc/hateoas/SpringDocHateoasConfiguration.java +++ b/springdoc-openapi-hateoas/src/main/java/org/springdoc/hateoas/SpringDocHateoasConfiguration.java @@ -27,6 +27,7 @@ import io.swagger.v3.core.util.Json; import org.springdoc.core.SpringDocConfigProperties; import org.springdoc.core.customizers.OpenApiCustomiser; +import org.springdoc.core.providers.ObjectMapperProvider; import org.springdoc.hateoas.converters.CollectionModelContentConverter; import org.springdoc.hateoas.converters.OpenApiHateoasLinksCustomiser; import org.springdoc.hateoas.converters.RepresentationModelLinksOASMixin; @@ -59,13 +60,14 @@ public class SpringDocHateoasConfiguration { * Hateoas hal provider hateoas hal provider. * * @param hateoasPropertiesOptional the hateoas properties optional + * @param objectMapperProvider the object mapper provider * @return the hateoas hal provider */ @Bean @ConditionalOnMissingBean @Lazy(false) - HateoasHalProvider hateoasHalProvider(Optional hateoasPropertiesOptional) { - return new HateoasHalProvider(hateoasPropertiesOptional); + HateoasHalProvider hateoasHalProvider(Optional hateoasPropertiesOptional, ObjectMapperProvider objectMapperProvider) { + return new HateoasHalProvider(hateoasPropertiesOptional, objectMapperProvider); } /** @@ -88,18 +90,19 @@ CollectionModelContentConverter collectionModelContentConverter(HateoasHalProvid * * @param halProvider the hal provider * @param springDocConfigProperties the spring doc config properties + * @param objectMapperProvider the object mapper provider * @return the open api customiser - * @see org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider) org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider) + * @see org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider) org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider)org.springframework.hateoas.mediatype.hal.Jackson2HalModule.HalLinkListSerializer#serialize(Links, JsonGenerator, SerializerProvider) */ @Bean(LINKS_SCHEMA_CUSTOMISER) @ConditionalOnMissingBean @Lazy(false) - OpenApiCustomiser linksSchemaCustomiser(HateoasHalProvider halProvider, SpringDocConfigProperties springDocConfigProperties) { + OpenApiCustomiser linksSchemaCustomiser(HateoasHalProvider halProvider, SpringDocConfigProperties springDocConfigProperties, ObjectMapperProvider objectMapperProvider) { if (!halProvider.isHalEnabled()) { return openApi -> { }; } - Json.mapper().addMixIn(RepresentationModel.class, RepresentationModelLinksOASMixin.class); + objectMapperProvider.jsonMapper().addMixIn(RepresentationModel.class, RepresentationModelLinksOASMixin.class); return new OpenApiHateoasLinksCustomiser(springDocConfigProperties); } diff --git a/springdoc-openapi-hateoas/src/test/java/test/org/springdoc/api/app6/SpringDocApp6Test.java b/springdoc-openapi-hateoas/src/test/java/test/org/springdoc/api/app6/SpringDocApp6Test.java index 64ff43d83..57461bee3 100644 --- a/springdoc-openapi-hateoas/src/test/java/test/org/springdoc/api/app6/SpringDocApp6Test.java +++ b/springdoc-openapi-hateoas/src/test/java/test/org/springdoc/api/app6/SpringDocApp6Test.java @@ -27,12 +27,13 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.introspect.SimpleMixInResolver; import com.fasterxml.jackson.databind.type.ClassKey; -import io.swagger.v3.core.util.Json; import org.apache.commons.lang3.reflect.FieldUtils; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; +import org.springdoc.core.providers.ObjectMapperProvider; import test.org.springdoc.api.AbstractSpringDocTest; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.test.context.TestPropertySource; @@ -43,12 +44,15 @@ public class SpringDocApp6Test extends AbstractSpringDocTest { static class SpringDocTestApp { } + @Autowired + ObjectMapperProvider objectMapperProvider; + private Map> springMixins = new HashMap<>(); @BeforeEach void init() throws IllegalAccessException { Field convertersField2 = FieldUtils.getDeclaredField(ObjectMapper.class, "_mixIns", true); - SimpleMixInResolver _mixIns = (SimpleMixInResolver) convertersField2.get(Json.mapper()); + SimpleMixInResolver _mixIns = (SimpleMixInResolver) convertersField2.get(objectMapperProvider.jsonMapper()); Field convertersField3 = FieldUtils.getDeclaredField(SimpleMixInResolver.class, "_localMixIns", true); Map> _localMixIns = (Map>) convertersField3.get(_mixIns); Iterator>> it = _localMixIns.entrySet().iterator(); @@ -65,7 +69,7 @@ void init() throws IllegalAccessException { @AfterEach private void clean() throws IllegalAccessException { Field convertersField2 = FieldUtils.getDeclaredField(ObjectMapper.class, "_mixIns", true); - SimpleMixInResolver _mixIns = (SimpleMixInResolver) convertersField2.get(Json.mapper()); + SimpleMixInResolver _mixIns = (SimpleMixInResolver) convertersField2.get(objectMapperProvider.jsonMapper()); Field convertersField3 = FieldUtils.getDeclaredField(SimpleMixInResolver.class, "_localMixIns", true); Map> _localMixIns = (Map>) convertersField3.get(_mixIns); _localMixIns.putAll(springMixins); diff --git a/springdoc-openapi-javadoc/src/main/java/org/springdoc/openapi/javadoc/JavadocPropertyCustomizer.java b/springdoc-openapi-javadoc/src/main/java/org/springdoc/openapi/javadoc/JavadocPropertyCustomizer.java index 0638934ca..b16e4c79e 100644 --- a/springdoc-openapi-javadoc/src/main/java/org/springdoc/openapi/javadoc/JavadocPropertyCustomizer.java +++ b/springdoc-openapi-javadoc/src/main/java/org/springdoc/openapi/javadoc/JavadocPropertyCustomizer.java @@ -29,11 +29,11 @@ import io.swagger.v3.core.converter.ModelConverter; import io.swagger.v3.core.converter.ModelConverterContext; import io.swagger.v3.core.util.AnnotationsUtils; -import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.models.media.Schema; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.reflect.FieldUtils; import org.springdoc.core.providers.JavadocProvider; +import org.springdoc.core.providers.ObjectMapperProvider; import org.springframework.util.CollectionUtils; @@ -48,13 +48,20 @@ public class JavadocPropertyCustomizer implements ModelConverter { */ private final JavadocProvider javadocProvider; + /** + * The Object mapper provider. + */ + private final ObjectMapperProvider objectMapperProvider; + /** * Instantiates a new Javadoc property customizer. * * @param javadocProvider the javadoc provider + * @param objectMapperProvider the object mapper provider */ - public JavadocPropertyCustomizer(JavadocProvider javadocProvider) { + public JavadocPropertyCustomizer(JavadocProvider javadocProvider, ObjectMapperProvider objectMapperProvider) { this.javadocProvider = javadocProvider; + this.objectMapperProvider = objectMapperProvider; } /** @@ -68,7 +75,7 @@ public JavadocPropertyCustomizer(JavadocProvider javadocProvider) { @Override public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator chain) { if (chain.hasNext()) { - JavaType javaType = Json.mapper().constructType(type.getType()); + JavaType javaType = objectMapperProvider.jsonMapper().constructType(type.getType()); if (javaType != null) { Class cls = javaType.getRawClass(); Schema resolvedSchema = chain.next().resolve(type, context, chain); @@ -93,6 +100,7 @@ else if (resolvedSchema != null && resolvedSchema.get$ref() != null && resolvedS /** * Sets javadoc description. * + * @param cls the cls * @param fields the fields * @param existingSchema the existing schema */ diff --git a/springdoc-openapi-javadoc/src/main/java/org/springdoc/openapi/javadoc/SpringDocJavadocConfiguration.java b/springdoc-openapi-javadoc/src/main/java/org/springdoc/openapi/javadoc/SpringDocJavadocConfiguration.java index 0cfaca6e4..fbec05e65 100644 --- a/springdoc-openapi-javadoc/src/main/java/org/springdoc/openapi/javadoc/SpringDocJavadocConfiguration.java +++ b/springdoc-openapi-javadoc/src/main/java/org/springdoc/openapi/javadoc/SpringDocJavadocConfiguration.java @@ -21,9 +21,11 @@ package org.springdoc.openapi.javadoc; import org.springdoc.core.providers.JavadocProvider; +import org.springdoc.core.providers.ObjectMapperProvider; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Lazy; @@ -37,6 +39,7 @@ @Lazy(false) @Configuration(proxyBeanMethods = false) @ConditionalOnProperty(name = SPRINGDOC_ENABLED, matchIfMissing = true) +@ConditionalOnWebApplication public class SpringDocJavadocConfiguration { /** @@ -55,12 +58,13 @@ SpringDocJavadocProvider springDocJavadocProvider( ) { * Javadoc property customizer javadoc property customizer. * * @param javadocProvider the javadoc provider + * @param objectMapperProvider the object mapper provider * @return the javadoc property customizer */ @Bean @ConditionalOnMissingBean @Lazy(false) - JavadocPropertyCustomizer javadocPropertyCustomizer( JavadocProvider javadocProvider){ - return new JavadocPropertyCustomizer(javadocProvider); + JavadocPropertyCustomizer javadocPropertyCustomizer( JavadocProvider javadocProvider, ObjectMapperProvider objectMapperProvider){ + return new JavadocPropertyCustomizer(javadocProvider, objectMapperProvider); } } diff --git a/springdoc-openapi-javadoc/src/test/java/test/org/springdoc/api/app157/SpringDocApp157Test.java b/springdoc-openapi-javadoc/src/test/java/test/org/springdoc/api/app157/SpringDocApp157Test.java index 911526298..fbc2eb5cc 100644 --- a/springdoc-openapi-javadoc/src/test/java/test/org/springdoc/api/app157/SpringDocApp157Test.java +++ b/springdoc-openapi-javadoc/src/test/java/test/org/springdoc/api/app157/SpringDocApp157Test.java @@ -4,11 +4,11 @@ import io.swagger.v3.core.converter.ModelConverters; import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; import test.org.springdoc.api.AbstractSpringDocTest; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.SpringBootApplication; import static org.hamcrest.Matchers.hasProperty; @@ -31,30 +31,20 @@ public class SpringDocApp157Test extends AbstractSpringDocTest { @SpringBootApplication static class SpringBootApp {} - /** - * The My converter. - */ - private StringyConverter myConverter = new StringyConverter(); + @Autowired + StringyConverter converter; /** * The Converters. */ private ModelConverters converters = ModelConverters.getInstance(); - /** - * Register converter. - */ - @BeforeEach - public void registerConverter() { - converters.addConverter(myConverter); - } - /** * Unregister converter. */ @AfterEach public void unregisterConverter() { - converters.removeConverter(myConverter); + converters.removeConverter(converter); } /** diff --git a/springdoc-openapi-javadoc/src/test/java/test/org/springdoc/api/app157/StringyConverter.java b/springdoc-openapi-javadoc/src/test/java/test/org/springdoc/api/app157/StringyConverter.java index 85d94fe84..b558db140 100644 --- a/springdoc-openapi-javadoc/src/test/java/test/org/springdoc/api/app157/StringyConverter.java +++ b/springdoc-openapi-javadoc/src/test/java/test/org/springdoc/api/app157/StringyConverter.java @@ -6,14 +6,25 @@ import io.swagger.v3.core.converter.AnnotatedType; import io.swagger.v3.core.converter.ModelConverter; import io.swagger.v3.core.converter.ModelConverterContext; -import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.models.media.Schema; +import org.springdoc.core.providers.ObjectMapperProvider; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; /** * The type Stringy converter. */ +@Component public class StringyConverter implements ModelConverter { + @Autowired + ObjectMapperProvider objectMapperProvider; + + public StringyConverter(ObjectMapperProvider objectMapperProvider) { + this.objectMapperProvider = objectMapperProvider; + } + /** * Resolve schema. * @@ -26,7 +37,7 @@ public class StringyConverter implements ModelConverter { public Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator chain) { - JavaType javaType = Json.mapper().constructType(type.getType()); + JavaType javaType = objectMapperProvider.jsonMapper().constructType(type.getType()); if (javaType.getRawClass().equals(String.class)) { type.getParent().addRequiredItem("stringy"); diff --git a/springdoc-openapi-javadoc/src/test/java/test/org/springdoc/api/app70/customizer/PropertyCustomizer.java b/springdoc-openapi-javadoc/src/test/java/test/org/springdoc/api/app70/customizer/PropertyCustomizer.java index b0eafc12e..2ffc34efc 100644 --- a/springdoc-openapi-javadoc/src/test/java/test/org/springdoc/api/app70/customizer/PropertyCustomizer.java +++ b/springdoc-openapi-javadoc/src/test/java/test/org/springdoc/api/app70/customizer/PropertyCustomizer.java @@ -26,10 +26,11 @@ import com.fasterxml.jackson.databind.JavaType; import io.swagger.v3.core.converter.AnnotatedType; -import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; +import org.springdoc.core.providers.ObjectMapperProvider; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** @@ -37,6 +38,10 @@ */ @Component public class PropertyCustomizer implements org.springdoc.core.customizers.PropertyCustomizer { + + @Autowired + ObjectMapperProvider objectMapperProvider; + /** * Customize schema. * @@ -56,7 +61,7 @@ public Schema customize(Schema property, AnnotatedType type) { .findFirst() .map(CustomizedProperty.class::cast); - JavaType javaType = Json.mapper().constructType(type.getType()); + JavaType javaType = objectMapperProvider.jsonMapper().constructType(type.getType()); if (javaType.getRawClass().equals(Duration.class)) { property = new StringSchema().format("duration").properties(Collections.emptyMap()); } diff --git a/springdoc-openapi-javadoc/src/test/java/test/org/springdoc/api/app72/BlockingAutoConfigurationTest.java b/springdoc-openapi-javadoc/src/test/java/test/org/springdoc/api/app72/BlockingAutoConfigurationTest.java index c48594f33..a4365fbd8 100644 --- a/springdoc-openapi-javadoc/src/test/java/test/org/springdoc/api/app72/BlockingAutoConfigurationTest.java +++ b/springdoc-openapi-javadoc/src/test/java/test/org/springdoc/api/app72/BlockingAutoConfigurationTest.java @@ -65,7 +65,7 @@ public void actuator_configuration_not_loaded_when_not_enabled_explicitly() { .run(context -> assertThat(context) .hasNotFailed() .hasBean("openApiResource") - .doesNotHaveBean("actuatorPprrovider") + .doesNotHaveBean("actuatorProvider") .hasBean("multipleOpenApiResource") ); } diff --git a/springdoc-openapi-kotlin/src/main/java/org/springdoc/kotlin/SpringDocKotlinConfiguration.java b/springdoc-openapi-kotlin/src/main/java/org/springdoc/kotlin/SpringDocKotlinConfiguration.java index 2c39d9963..8ed81bd70 100644 --- a/springdoc-openapi-kotlin/src/main/java/org/springdoc/kotlin/SpringDocKotlinConfiguration.java +++ b/springdoc-openapi-kotlin/src/main/java/org/springdoc/kotlin/SpringDocKotlinConfiguration.java @@ -21,9 +21,9 @@ package org.springdoc.kotlin; import com.fasterxml.jackson.module.kotlin.KotlinModule; -import io.swagger.v3.core.util.Json; import kotlin.Deprecated; import kotlin.coroutines.Continuation; +import org.springdoc.core.providers.ObjectMapperProvider; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; @@ -43,10 +43,21 @@ @ConditionalOnProperty(name = SPRINGDOC_ENABLED, matchIfMissing = true) public class SpringDocKotlinConfiguration { - static { + /** + * The Object mapper provider. + */ + private final ObjectMapperProvider objectMapperProvider; + + /** + * Instantiates a new Spring doc kotlin configuration. + * + * @param objectMapperProvider the object mapper provider + */ + public SpringDocKotlinConfiguration(ObjectMapperProvider objectMapperProvider) { + this.objectMapperProvider = objectMapperProvider; getConfig().addRequestWrapperToIgnore(Continuation.class) .addDeprecatedType(Deprecated.class); - Json.mapper().registerModule(new KotlinModule()); + objectMapperProvider.jsonMapper().registerModule(new KotlinModule()); } /** diff --git a/springdoc-openapi-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerConfig.java b/springdoc-openapi-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerConfig.java index 837d0bcf1..9e0482b8b 100644 --- a/springdoc-openapi-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerConfig.java +++ b/springdoc-openapi-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerConfig.java @@ -28,6 +28,7 @@ import org.springdoc.core.SwaggerUiConfigProperties; import org.springdoc.core.SwaggerUiOAuthProperties; import org.springdoc.core.providers.ActuatorProvider; +import org.springdoc.core.providers.ObjectMapperProvider; import org.springdoc.core.providers.SpringWebProvider; import org.springdoc.webmvc.core.SpringWebMvcProvider; @@ -124,13 +125,15 @@ SwaggerUiHome swaggerUiHome() { * @param swaggerUiOAuthProperties the swagger ui o auth properties * @param swaggerUiConfigParameters the swagger ui config parameters * @param swaggerWelcomeCommon the swagger welcome common + * @param objectMapperProvider the object mapper provider * @return the swagger index transformer */ @Bean @ConditionalOnMissingBean @Lazy(false) - SwaggerIndexTransformer indexPageTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, SwaggerUiConfigParameters swaggerUiConfigParameters, SwaggerWelcomeCommon swaggerWelcomeCommon) { - return new SwaggerIndexPageTransformer(swaggerUiConfig, swaggerUiOAuthProperties, swaggerUiConfigParameters, swaggerWelcomeCommon); + SwaggerIndexTransformer indexPageTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, + SwaggerUiConfigParameters swaggerUiConfigParameters, SwaggerWelcomeCommon swaggerWelcomeCommon, ObjectMapperProvider objectMapperProvider) { + return new SwaggerIndexPageTransformer(swaggerUiConfig, swaggerUiOAuthProperties, swaggerUiConfigParameters, swaggerWelcomeCommon, objectMapperProvider); } /** diff --git a/springdoc-openapi-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerIndexPageTransformer.java b/springdoc-openapi-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerIndexPageTransformer.java index c342258e8..f5172060c 100644 --- a/springdoc-openapi-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerIndexPageTransformer.java +++ b/springdoc-openapi-ui/src/main/java/org/springdoc/webmvc/ui/SwaggerIndexPageTransformer.java @@ -27,6 +27,7 @@ import org.springdoc.core.SwaggerUiConfigParameters; import org.springdoc.core.SwaggerUiConfigProperties; import org.springdoc.core.SwaggerUiOAuthProperties; +import org.springdoc.core.providers.ObjectMapperProvider; import org.springdoc.ui.AbstractSwaggerIndexTransformer; import org.springframework.core.io.Resource; @@ -54,8 +55,9 @@ public class SwaggerIndexPageTransformer extends AbstractSwaggerIndexTransformer * @param swaggerUiConfigParameters the swagger ui config parameters * @param swaggerWelcomeCommon the swagger welcome common */ - public SwaggerIndexPageTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, SwaggerUiConfigParameters swaggerUiConfigParameters, SwaggerWelcomeCommon swaggerWelcomeCommon) { - super(swaggerUiConfig, swaggerUiOAuthProperties, swaggerUiConfigParameters); + public SwaggerIndexPageTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, + SwaggerUiConfigParameters swaggerUiConfigParameters, SwaggerWelcomeCommon swaggerWelcomeCommon, ObjectMapperProvider objectMapperProvider) { + super(swaggerUiConfig, swaggerUiOAuthProperties, swaggerUiConfigParameters, objectMapperProvider); this.swaggerWelcomeCommon = swaggerWelcomeCommon; } diff --git a/springdoc-openapi-ui/src/test/java/test/org/springdoc/ui/app22/SpringDocTestApp.java b/springdoc-openapi-ui/src/test/java/test/org/springdoc/ui/app22/SpringDocTestApp.java index 6465a6d9f..3f63ed818 100644 --- a/springdoc-openapi-ui/src/test/java/test/org/springdoc/ui/app22/SpringDocTestApp.java +++ b/springdoc-openapi-ui/src/test/java/test/org/springdoc/ui/app22/SpringDocTestApp.java @@ -20,6 +20,7 @@ import org.springdoc.core.SpringDocConfigProperties; import org.springdoc.core.SpringDocConfiguration; +import org.springdoc.core.providers.ObjectMapperProvider; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -38,8 +39,12 @@ SpringDocConfiguration springDocConfiguration(){ } @Bean - public SpringDocConfigProperties springDocConfigProperties() { + SpringDocConfigProperties springDocConfigProperties() { return new SpringDocConfigProperties(); } + @Bean + ObjectMapperProvider objectMapperProvider(SpringDocConfigProperties springDocConfigProperties){ + return new ObjectMapperProvider(springDocConfigProperties); + } } \ No newline at end of file diff --git a/springdoc-openapi-webflux-core/src/main/java/org/springdoc/webflux/core/SpringDocWebFluxConfiguration.java b/springdoc-openapi-webflux-core/src/main/java/org/springdoc/webflux/core/SpringDocWebFluxConfiguration.java index 99da1c08c..a17b3e382 100644 --- a/springdoc-openapi-webflux-core/src/main/java/org/springdoc/webflux/core/SpringDocWebFluxConfiguration.java +++ b/springdoc-openapi-webflux-core/src/main/java/org/springdoc/webflux/core/SpringDocWebFluxConfiguration.java @@ -38,6 +38,7 @@ import org.springdoc.core.customizers.ParameterCustomizer; import org.springdoc.core.filters.OpenApiMethodFilter; import org.springdoc.core.providers.ActuatorProvider; +import org.springdoc.core.providers.ObjectMapperProvider; import org.springdoc.core.providers.SpringWebProvider; import org.springdoc.webflux.api.OpenApiActuatorResource; import org.springdoc.webflux.api.OpenApiWebfluxResource; @@ -144,13 +145,14 @@ GenericResponseService responseBuilder(OperationService operationService, List chain) { - JavaType javaType = Json.mapper().constructType(type.getType()); + JavaType javaType = objectMapperProvider.jsonMapper().constructType(type.getType()); if (javaType != null) { Class cls = javaType.getRawClass(); if (isFluxTypeWrapper(cls)) { diff --git a/springdoc-openapi-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerConfig.java b/springdoc-openapi-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerConfig.java index 8edfe2b1c..8911ce2b3 100644 --- a/springdoc-openapi-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerConfig.java +++ b/springdoc-openapi-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerConfig.java @@ -28,6 +28,7 @@ import org.springdoc.core.SwaggerUiConfigProperties; import org.springdoc.core.SwaggerUiOAuthProperties; import org.springdoc.core.providers.ActuatorProvider; +import org.springdoc.core.providers.ObjectMapperProvider; import org.springdoc.core.providers.SpringWebProvider; import org.springdoc.webflux.core.SpringWebFluxProvider; @@ -132,13 +133,15 @@ SwaggerWebFluxConfigurer swaggerWebFluxConfigurer(SwaggerUiConfigParameters swag * @param swaggerUiOAuthProperties the swagger ui o auth properties * @param swaggerUiConfigParameters the swagger ui config parameters * @param swaggerWelcomeCommon the swagger welcome common + * @param objectMapperProvider the object mapper provider * @return the swagger index transformer */ @Bean @ConditionalOnMissingBean @Lazy(false) - SwaggerIndexTransformer indexPageTransformer(SwaggerUiConfigProperties swaggerUiConfig ,SwaggerUiOAuthProperties swaggerUiOAuthProperties, SwaggerUiConfigParameters swaggerUiConfigParameters,SwaggerWelcomeCommon swaggerWelcomeCommon) { - return new SwaggerIndexPageTransformer(swaggerUiConfig, swaggerUiOAuthProperties,swaggerUiConfigParameters, swaggerWelcomeCommon); + SwaggerIndexTransformer indexPageTransformer(SwaggerUiConfigProperties swaggerUiConfig ,SwaggerUiOAuthProperties swaggerUiOAuthProperties, + SwaggerUiConfigParameters swaggerUiConfigParameters,SwaggerWelcomeCommon swaggerWelcomeCommon, ObjectMapperProvider objectMapperProvider) { + return new SwaggerIndexPageTransformer(swaggerUiConfig, swaggerUiOAuthProperties,swaggerUiConfigParameters, swaggerWelcomeCommon, objectMapperProvider); } /** diff --git a/springdoc-openapi-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerIndexPageTransformer.java b/springdoc-openapi-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerIndexPageTransformer.java index 7ce7f1412..0550c1442 100644 --- a/springdoc-openapi-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerIndexPageTransformer.java +++ b/springdoc-openapi-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerIndexPageTransformer.java @@ -23,6 +23,7 @@ import org.springdoc.core.SwaggerUiConfigParameters; import org.springdoc.core.SwaggerUiConfigProperties; import org.springdoc.core.SwaggerUiOAuthProperties; +import org.springdoc.core.providers.ObjectMapperProvider; import org.springdoc.ui.AbstractSwaggerIndexTransformer; import org.springdoc.ui.SpringDocUIException; import reactor.core.publisher.Mono; @@ -52,9 +53,11 @@ public class SwaggerIndexPageTransformer extends AbstractSwaggerIndexTransformer * @param swaggerUiOAuthProperties the swagger ui o auth properties * @param swaggerUiConfigParameters the swagger ui config parameters * @param swaggerWelcomeCommon the swagger welcome common + * @param objectMapperProvider the object mapper providern */ - public SwaggerIndexPageTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, SwaggerUiConfigParameters swaggerUiConfigParameters, SwaggerWelcomeCommon swaggerWelcomeCommon) { - super(swaggerUiConfig, swaggerUiOAuthProperties, swaggerUiConfigParameters); + public SwaggerIndexPageTransformer(SwaggerUiConfigProperties swaggerUiConfig, SwaggerUiOAuthProperties swaggerUiOAuthProperties, + SwaggerUiConfigParameters swaggerUiConfigParameters, SwaggerWelcomeCommon swaggerWelcomeCommon, ObjectMapperProvider objectMapperProvider) { + super(swaggerUiConfig, swaggerUiOAuthProperties, swaggerUiConfigParameters, objectMapperProvider); this.swaggerWelcomeCommon = swaggerWelcomeCommon; } diff --git a/springdoc-openapi-webflux-ui/src/test/java/test/org/springdoc/ui/app24/SpringDocConfig.java b/springdoc-openapi-webflux-ui/src/test/java/test/org/springdoc/ui/app24/SpringDocConfig.java index 01f98c5cd..c6cbc4157 100644 --- a/springdoc-openapi-webflux-ui/src/test/java/test/org/springdoc/ui/app24/SpringDocConfig.java +++ b/springdoc-openapi-webflux-ui/src/test/java/test/org/springdoc/ui/app24/SpringDocConfig.java @@ -2,6 +2,7 @@ import org.springdoc.core.SpringDocConfigProperties; import org.springdoc.core.SpringDocConfiguration; +import org.springdoc.core.providers.ObjectMapperProvider; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -15,7 +16,12 @@ SpringDocConfiguration springDocConfiguration(){ } @Bean - public SpringDocConfigProperties springDocConfigProperties() { + SpringDocConfigProperties springDocConfigProperties() { return new SpringDocConfigProperties(); } + + @Bean + ObjectMapperProvider objectMapperProvider(SpringDocConfigProperties springDocConfigProperties){ + return new ObjectMapperProvider(springDocConfigProperties); + } } diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/AbstractSpringDocActuatorTest.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/AbstractSpringDocActuatorTest.java deleted file mode 100644 index c9c2febd4..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/AbstractSpringDocActuatorTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package test.org.springdoc.api; - -import javax.annotation.PostConstruct; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.actuate.autoconfigure.web.server.LocalManagementPort; -import org.springframework.boot.web.client.RestTemplateBuilder; -import org.springframework.test.context.TestPropertySource; -import org.springframework.web.client.RestTemplate; - -@TestPropertySource(properties={ "management.endpoints.enabled-by-default=true" }) -public abstract class AbstractSpringDocActuatorTest extends AbstractCommonTest{ - - @LocalManagementPort - private int managementPort; - - @Autowired - private RestTemplateBuilder restTemplateBuilder; - - protected RestTemplate actuatorRestTemplate; - - @PostConstruct - void init() { - actuatorRestTemplate = restTemplateBuilder - .rootUri("http://localhost:" + this.managementPort).build(); - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ApiException.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ApiException.java deleted file mode 100644 index 2c061ad03..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ApiException.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app1; - -public final class ApiException extends Exception { - - private static final long serialVersionUID = 1L; - - @SuppressWarnings("unused") - - private final int code; - - public ApiException(int code, String msg) { - super(msg); - this.code = code; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ErrorMessage.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ErrorMessage.java deleted file mode 100644 index 63d9be499..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ErrorMessage.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app1; - -public class ErrorMessage { - - private String id; - - private String message; - - public ErrorMessage(String id, String message2) { - this.id = id; - this.message = message2; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/HelloController.java deleted file mode 100644 index 34e34b4d1..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/HelloController.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app1; - - -import io.swagger.v3.oas.annotations.tags.Tag; - -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping(value = "/hello/{numTelco}") - @ResponseStatus(HttpStatus.I_AM_A_TEAPOT) - @Tag(name = "${prop.toto}") - public String index(@PathVariable("numTelco") String numTel, String adresse) { - return "Greetings from Spring Boot!"; - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/HomeController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/HomeController.java deleted file mode 100644 index 35a187127..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/HomeController.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app1; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; - -import static org.springdoc.core.Constants.SWAGGER_UI_PATH; -import static org.springframework.util.AntPathMatcher.DEFAULT_PATH_SEPARATOR; -import static org.springframework.web.servlet.view.UrlBasedViewResolver.REDIRECT_URL_PREFIX; - -/** - * Home redirection to swagger api documentation - */ -@Controller -public class HomeController { - - @Value(SWAGGER_UI_PATH) - private String swaggerUiPath; - - @GetMapping(DEFAULT_PATH_SEPARATOR) - public String index() { - return REDIRECT_URL_PREFIX + swaggerUiPath; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/PersonDTO.java deleted file mode 100644 index 766db47ab..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/PersonDTO.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app1; - -public class PersonDTO { - private String email; - - private String firstName; - - private String lastName; - - public PersonDTO() { - } - - public PersonDTO(final String email, final String firstName, final String lastName) { - this.email = email; - this.firstName = firstName; - this.lastName = lastName; - } - - public String getEmail() { - return email; - } - - public void setEmail(final String email) { - this.email = email; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(final String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(final String lastName) { - this.lastName = lastName; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app10/SpringDocApp10Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app10/SpringDocApp10Test.java deleted file mode 100644 index df0aaefac..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app10/SpringDocApp10Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app10; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp10Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app100/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app100/HelloController.java deleted file mode 100644 index 255139f6e..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app100/HelloController.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app100; - -import javax.validation.constraints.NotNull; - -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.tags.Tags; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@Tags(value = @Tag(name = "hello-ap1")) -public class HelloController { - - @GetMapping(value = "/search", produces = { "application/xml", "application/json" }) - @Tags(value = @Tag(name = "hello-ap2")) - public PersonDTO getAllPets(@NotNull String toto) { - return null; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app100/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app100/PersonDTO.java deleted file mode 100644 index cd4854eb8..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app100/PersonDTO.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app100; - -import io.swagger.v3.oas.annotations.media.Schema; - -@Schema -public class PersonDTO { - private String email; - - private String firstName; - - private String lastName; - - public PersonDTO() { - } - - public PersonDTO(final String email, final String firstName, final String lastName) { - this.email = email; - this.firstName = firstName; - this.lastName = lastName; - } - - public String getEmail() { - return email; - } - - public void setEmail(final String email) { - this.email = email; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(final String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(final String lastName) { - this.lastName = lastName; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app100/SpringDocApp100Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app100/SpringDocApp100Test.java deleted file mode 100644 index 3d922a96b..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app100/SpringDocApp100Test.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app100; - - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp100Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app101/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app101/HelloController.java deleted file mode 100644 index 20beb44a0..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app101/HelloController.java +++ /dev/null @@ -1,23 +0,0 @@ -package test.org.springdoc.api.app101; - -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.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("/hello") -public class HelloController { - - @GetMapping - @ApiResponse(content = @Content(schema = @Schema( - description = "${test.app101.operation.hello.response.schema.description}", - implementation = HelloDTO.class))) - public HelloDTO hello() { - return new HelloDTO(); - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app101/HelloDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app101/HelloDTO.java deleted file mode 100644 index fb95f8167..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app101/HelloDTO.java +++ /dev/null @@ -1,21 +0,0 @@ -package test.org.springdoc.api.app101; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; - -@Schema(description = "${test.app101.schema.hello.description}") -public class HelloDTO { - - @Schema(description = "${test.app101.schema.hello.param.id.description}") - private String id; - - @JsonProperty("id") - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app101/SpringDocApp101Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app101/SpringDocApp101Test.java deleted file mode 100644 index 21a09a426..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app101/SpringDocApp101Test.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app101; - - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.test.context.ActiveProfiles; - -@ActiveProfiles("101") -public class SpringDocApp101Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app102/InheritedRequestParams.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app102/InheritedRequestParams.java deleted file mode 100644 index bcb836f83..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app102/InheritedRequestParams.java +++ /dev/null @@ -1,19 +0,0 @@ -package test.org.springdoc.api.app102; - -import javax.validation.constraints.NotBlank; - -import io.swagger.v3.oas.annotations.Parameter; - -public class InheritedRequestParams extends RequestParams { - @Parameter(description = "parameter from child of RequestParams") - @NotBlank - private String childParam; - - public String getChildParam() { - return childParam; - } - - public void setChildParam(String childParam) { - this.childParam = childParam; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app102/SpringDocApp102Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app102/SpringDocApp102Test.java deleted file mode 100644 index 019f521a8..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app102/SpringDocApp102Test.java +++ /dev/null @@ -1,10 +0,0 @@ -package test.org.springdoc.api.app102; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp102Test extends AbstractSpringDocTest { - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app102/TestController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app102/TestController.java deleted file mode 100644 index 091e0b1b4..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app102/TestController.java +++ /dev/null @@ -1,15 +0,0 @@ -package test.org.springdoc.api.app102; - -import org.springdoc.api.annotations.ParameterObject; - -import org.springframework.lang.Nullable; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class TestController { - @GetMapping("test") - public void getTest(@RequestParam @Nullable String param, @ParameterObject InheritedRequestParams requestParams) { - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app103/ExampleBody.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app103/ExampleBody.java deleted file mode 100644 index 4d93ef747..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app103/ExampleBody.java +++ /dev/null @@ -1,23 +0,0 @@ -package test.org.springdoc.api.app103; - -public class ExampleBody { - private String stringParam; - - private int intParam; - - public String getStringParam() { - return stringParam; - } - - public void setStringParam(String stringParam) { - this.stringParam = stringParam; - } - - public int getIntParam() { - return intParam; - } - - public void setIntParam(int intParam) { - this.intParam = intParam; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app103/SpringDocApp103Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app103/SpringDocApp103Test.java deleted file mode 100644 index 3fb2fa10e..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app103/SpringDocApp103Test.java +++ /dev/null @@ -1,10 +0,0 @@ -package test.org.springdoc.api.app103; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp103Test extends AbstractSpringDocTest { - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app104/CrudController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app104/CrudController.java deleted file mode 100644 index cedf257f1..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app104/CrudController.java +++ /dev/null @@ -1,31 +0,0 @@ -package test.org.springdoc.api.app104; - -import java.util.List; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; - -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.ResponseBody; - -@Controller -@SuppressWarnings("rawtypes") -public abstract class CrudController { - - @GetMapping(path = "{id}") - @ResponseBody - @Operation(description = "Get single object") - public T get( // - @Parameter(description = "The id to get.", required = true) @PathVariable("id") int id) { - return null; - } - - @GetMapping(path = "") - @ResponseBody - @Operation(description = "Receive a list of objects") - public List list() { - return null; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app104/Design.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app104/Design.java deleted file mode 100644 index b205886ab..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app104/Design.java +++ /dev/null @@ -1,4 +0,0 @@ -package test.org.springdoc.api.app104; - -public class Design extends HavingPK { -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app104/DesignController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app104/DesignController.java deleted file mode 100644 index eaeab696f..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app104/DesignController.java +++ /dev/null @@ -1,14 +0,0 @@ -package test.org.springdoc.api.app104; - -import io.swagger.v3.oas.annotations.tags.Tag; - -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; - -@Tag(name = "design") -@Controller -@RequestMapping("/design") -public class DesignController extends CrudController { - - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app104/HavingPK.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app104/HavingPK.java deleted file mode 100644 index df5c3eb0b..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app104/HavingPK.java +++ /dev/null @@ -1,4 +0,0 @@ -package test.org.springdoc.api.app104; - -public class HavingPK { -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app104/SpringDocApp104Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app104/SpringDocApp104Test.java deleted file mode 100644 index c1ba2a5bf..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app104/SpringDocApp104Test.java +++ /dev/null @@ -1,10 +0,0 @@ -package test.org.springdoc.api.app104; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp104Test extends AbstractSpringDocTest { - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/HomeController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/HomeController.java deleted file mode 100644 index b3b04c2f4..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/HomeController.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app105.api; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; - -import static org.springdoc.core.Constants.SWAGGER_UI_PATH; -import static org.springframework.util.AntPathMatcher.DEFAULT_PATH_SEPARATOR; -import static org.springframework.web.servlet.view.UrlBasedViewResolver.REDIRECT_URL_PREFIX; - -/** - * Home redirection to swagger api documentation - */ -@Controller -public class HomeController { - - @Value(SWAGGER_UI_PATH) - private String swaggerUiPath; - - @GetMapping(DEFAULT_PATH_SEPARATOR) - public String index() { - return REDIRECT_URL_PREFIX + swaggerUiPath; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/pet/PetApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/pet/PetApiController.java deleted file mode 100644 index 00462427c..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/pet/PetApiController.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app105.api.pet; - -import java.util.Optional; - -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") - -@RestController -@RequestMapping("${openapi.openAPIPetstore.base-path:/}") -public class PetApiController implements PetApi { - - private final PetApiDelegate delegate; - - public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() { - }); - } - - @Override - public PetApiDelegate getDelegate() { - return delegate; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/pet/PetApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/pet/PetApiDelegateImpl.java deleted file mode 100644 index 754e78174..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/pet/PetApiDelegateImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app105.api.pet; - -import org.springframework.stereotype.Service; - -@Service -public class PetApiDelegateImpl implements PetApiDelegate { - - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/store/StoreApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/store/StoreApiController.java deleted file mode 100644 index 5caceceda..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/store/StoreApiController.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app105.api.store; - -import java.util.Optional; - -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") - -@RestController -@RequestMapping("${openapi.openAPIPetstore.base-path:/}") -public class StoreApiController implements StoreApi { - - private final StoreApiDelegate delegate; - - public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() { - }); - } - - @Override - public StoreApiDelegate getDelegate() { - return delegate; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/store/StoreApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/store/StoreApiDelegateImpl.java deleted file mode 100644 index 9453bd526..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/store/StoreApiDelegateImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app105.api.store; - -import org.springframework.stereotype.Service; - -@Service -public class StoreApiDelegateImpl implements StoreApiDelegate { - - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/user/UserApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/user/UserApiController.java deleted file mode 100644 index 85fadaf70..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/user/UserApiController.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app105.api.user; - -import java.util.Optional; - -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") - -@RestController -@RequestMapping("${openapi.openAPIPetstore.base-path:/}") -public class UserApiController implements UserApi { - - private final UserApiDelegate delegate; - - public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() { - }); - } - - @Override - public UserApiDelegate getDelegate() { - return delegate; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/user/UserApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/user/UserApiDelegateImpl.java deleted file mode 100644 index 61a88582c..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/user/UserApiDelegateImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app105.api.user; - -import org.springframework.stereotype.Service; - -@Service -public class UserApiDelegateImpl implements UserApiDelegate { - - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app106/SpringDocApp106Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app106/SpringDocApp106Test.java deleted file mode 100644 index d4a95a94d..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app106/SpringDocApp106Test.java +++ /dev/null @@ -1,10 +0,0 @@ -package test.org.springdoc.api.app106; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp106Test extends AbstractSpringDocTest { - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app107/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app107/HelloController.java deleted file mode 100644 index b9f855ef4..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app107/HelloController.java +++ /dev/null @@ -1,36 +0,0 @@ -package test.org.springdoc.api.app107; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping(path = "/entity-b", produces = { "application/json", "application/xml" }) - public EntityB getEntityB() { - return new EntityB(); - } - - public class EntityB { - - @Schema(required = true) - @JsonProperty("fieldB") - private String fieldB; - - @Schema(required = true) - @JsonProperty("entityA") - private EntityA entityA; - //Getters and setters... - } - - public class EntityA { - @Schema(required = true) - @JsonProperty("fieldA") - private String fieldA; - //Getters and setters... - } -} - diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app107/SpringDocApp107Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app107/SpringDocApp107Test.java deleted file mode 100644 index e6b630bfc..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app107/SpringDocApp107Test.java +++ /dev/null @@ -1,10 +0,0 @@ -package test.org.springdoc.api.app107; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp107Test extends AbstractSpringDocTest { - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app108/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app108/HelloController.java deleted file mode 100644 index 44b609b85..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app108/HelloController.java +++ /dev/null @@ -1,14 +0,0 @@ -package test.org.springdoc.api.app108; - -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @PostMapping - public ActionResult update(String toto) { - return null; - } -} - diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app108/SpringDocApp108Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app108/SpringDocApp108Test.java deleted file mode 100644 index 2c1e10bfa..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app108/SpringDocApp108Test.java +++ /dev/null @@ -1,10 +0,0 @@ -package test.org.springdoc.api.app108; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp108Test extends AbstractSpringDocTest { - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app109/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app109/HelloController.java deleted file mode 100644 index 37b4da90d..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app109/HelloController.java +++ /dev/null @@ -1,25 +0,0 @@ -package test.org.springdoc.api.app109; - -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.springframework.core.io.ByteArrayResource; -import org.springframework.core.io.Resource; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping("/api/v1/resource") - public Resource getResource() { - return new ByteArrayResource(new byte[] {}); - } - - @GetMapping("/api/v1/bytearray") - @ApiResponse(content = @Content(schema = @Schema(type = "string", format = "binary"))) - public byte[] getByteArray() { - return new byte[] {}; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app109/SpringDocApp109Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app109/SpringDocApp109Test.java deleted file mode 100644 index c560fc4b7..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app109/SpringDocApp109Test.java +++ /dev/null @@ -1,10 +0,0 @@ -package test.org.springdoc.api.app109; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp109Test extends AbstractSpringDocTest { - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app11/SpringDocApp11Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app11/SpringDocApp11Test.java deleted file mode 100644 index 5345f214b..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app11/SpringDocApp11Test.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app11; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp11Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/ErrorMessage.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/ErrorMessage.java deleted file mode 100644 index 9fb963a95..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/ErrorMessage.java +++ /dev/null @@ -1,34 +0,0 @@ -package test.org.springdoc.api.app110; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - - -public class ErrorMessage { - - private List errors; - - public ErrorMessage() { - } - - public ErrorMessage(List errors) { - this.errors = errors; - } - - public ErrorMessage(String error) { - this(Collections.singletonList(error)); - } - - public ErrorMessage(String... errors) { - this(Arrays.asList(errors)); - } - - public List getErrors() { - return errors; - } - - public void setErrors(List errors) { - this.errors = errors; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/Problem.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/Problem.java deleted file mode 100644 index 81f2d0547..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/Problem.java +++ /dev/null @@ -1,35 +0,0 @@ -package test.org.springdoc.api.app110; - -public class Problem { - - private String logRef; - - private String message; - - public Problem(String logRef, String message) { - super(); - this.logRef = logRef; - this.message = message; - } - - public Problem() { - super(); - - } - - public String getLogRef() { - return logRef; - } - - public void setLogRef(String logRef) { - this.logRef = logRef; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/ErrorMessage.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/ErrorMessage.java deleted file mode 100644 index c68f38c56..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/ErrorMessage.java +++ /dev/null @@ -1,34 +0,0 @@ -package test.org.springdoc.api.app111; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - - -public class ErrorMessage { - - private List errors; - - public ErrorMessage() { - } - - public ErrorMessage(List errors) { - this.errors = errors; - } - - public ErrorMessage(String error) { - this(Collections.singletonList(error)); - } - - public ErrorMessage(String... errors) { - this(Arrays.asList(errors)); - } - - public List getErrors() { - return errors; - } - - public void setErrors(List errors) { - this.errors = errors; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/Problem.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/Problem.java deleted file mode 100644 index ba8de5005..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/Problem.java +++ /dev/null @@ -1,35 +0,0 @@ -package test.org.springdoc.api.app111; - -public class Problem { - - private String logRef; - - private String message; - - public Problem(String logRef, String message) { - super(); - this.logRef = logRef; - this.message = message; - } - - public Problem() { - super(); - - } - - public String getLogRef() { - return logRef; - } - - public void setLogRef(String logRef) { - this.logRef = logRef; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/ErrorMessage.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/ErrorMessage.java deleted file mode 100644 index 89742b247..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/ErrorMessage.java +++ /dev/null @@ -1,34 +0,0 @@ -package test.org.springdoc.api.app112; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - - -public class ErrorMessage { - - private List errors; - - public ErrorMessage() { - } - - public ErrorMessage(List errors) { - this.errors = errors; - } - - public ErrorMessage(String error) { - this(Collections.singletonList(error)); - } - - public ErrorMessage(String... errors) { - this(Arrays.asList(errors)); - } - - public List getErrors() { - return errors; - } - - public void setErrors(List errors) { - this.errors = errors; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/Problem.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/Problem.java deleted file mode 100644 index 318621e67..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/Problem.java +++ /dev/null @@ -1,35 +0,0 @@ -package test.org.springdoc.api.app112; - -public class Problem { - - private String logRef; - - private String message; - - public Problem(String logRef, String message) { - super(); - this.logRef = logRef; - this.message = message; - } - - public Problem() { - super(); - - } - - public String getLogRef() { - return logRef; - } - - public void setLogRef(String logRef) { - this.logRef = logRef; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app113/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app113/HelloController.java deleted file mode 100644 index cd2e640fc..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app113/HelloController.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app113; - -import java.util.Optional; - -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @PostMapping("/lol") - public void test(@RequestBody(required = false) Body body) { - } - - @PostMapping("/lol2") - public void test2(@RequestBody Optional body) { - } - - public class Body { - public String field; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app113/SpringDocApp113Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app113/SpringDocApp113Test.java deleted file mode 100644 index 430158df5..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app113/SpringDocApp113Test.java +++ /dev/null @@ -1,12 +0,0 @@ -package test.org.springdoc.api.app113; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - - -public class SpringDocApp113Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app114/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app114/HelloController.java deleted file mode 100644 index 2daf2a682..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app114/HelloController.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app114; - -import javax.money.MonetaryAmount; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @PostMapping(value = "/foos1", consumes = MediaType.APPLICATION_JSON_VALUE) - MonetaryAmount getCurrency(@RequestBody CarDTO carDTO) { - return carDTO.price; - } - - class CarDTO { - @JsonProperty("price") - MonetaryAmount price; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app114/SpringDocApp114Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app114/SpringDocApp114Test.java deleted file mode 100644 index cace0b3a2..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app114/SpringDocApp114Test.java +++ /dev/null @@ -1,19 +0,0 @@ -package test.org.springdoc.api.app114; - -import javax.money.MonetaryAmount; - -import org.springdoc.core.SpringDocUtils; -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - - -public class SpringDocApp114Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - - static { - SpringDocUtils.getConfig().replaceWithClass(MonetaryAmount.class, org.springdoc.core.converters.models.MonetaryAmount.class); - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app115/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app115/HelloController.java deleted file mode 100644 index 0cf36c29a..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app115/HelloController.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app115; - -import java.time.Duration; - -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping(value = "/api/v2/timeout", - consumes = { MediaType.ALL_VALUE }, - produces = { MediaType.APPLICATION_JSON_VALUE }) - public Duration timeouts() { - return Duration.ofSeconds(5); - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app115/SpringDocApp115Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app115/SpringDocApp115Test.java deleted file mode 100644 index baf590273..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app115/SpringDocApp115Test.java +++ /dev/null @@ -1,13 +0,0 @@ -package test.org.springdoc.api.app115; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - - -public class SpringDocApp115Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app116/FooErrorHandler.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app116/FooErrorHandler.java deleted file mode 100644 index dcfd555a9..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app116/FooErrorHandler.java +++ /dev/null @@ -1,15 +0,0 @@ -package test.org.springdoc.api.app116; - -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.ControllerAdvice; -import org.springframework.web.bind.annotation.ExceptionHandler; - -@ControllerAdvice(assignableTypes = HelloController.class) -public class FooErrorHandler { - - @ExceptionHandler - public ResponseEntity storeAssignmentPublishingError(Exception e) { - return new ResponseEntity<>("foo", HttpStatus.INTERNAL_SERVER_ERROR); - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app116/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app116/HelloController.java deleted file mode 100644 index 00f2f7875..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app116/HelloController.java +++ /dev/null @@ -1,23 +0,0 @@ -package test.org.springdoc.api.app116; - -import io.swagger.v3.oas.annotations.OpenAPIDefinition; -import io.swagger.v3.oas.annotations.info.Info; -import io.swagger.v3.oas.annotations.tags.Tag; - -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("/api") -@OpenAPIDefinition(info = @Info(title = "API Examples", version = "1.0"), tags = @Tag(name = "Operations")) -public class HelloController { - - @PostMapping("/foo") - public String create(@RequestBody String foo) { - return "foo"; - } -} - - diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app116/SpringDocApp116Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app116/SpringDocApp116Test.java deleted file mode 100644 index 097423b56..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app116/SpringDocApp116Test.java +++ /dev/null @@ -1,13 +0,0 @@ -package test.org.springdoc.api.app116; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - - -public class SpringDocApp116Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app117/SpringDocApp117Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app117/SpringDocApp117Test.java deleted file mode 100644 index 24b9071f9..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app117/SpringDocApp117Test.java +++ /dev/null @@ -1,12 +0,0 @@ -package test.org.springdoc.api.app117; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - - -public class SpringDocApp117Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app118/SpringDocApp118Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app118/SpringDocApp118Test.java deleted file mode 100644 index 8c12290db..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app118/SpringDocApp118Test.java +++ /dev/null @@ -1,12 +0,0 @@ -package test.org.springdoc.api.app118; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - - -public class SpringDocApp118Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app119/JsonRequest.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app119/JsonRequest.java deleted file mode 100644 index 0c3084daf..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app119/JsonRequest.java +++ /dev/null @@ -1,14 +0,0 @@ -package test.org.springdoc.api.app119; - -public class JsonRequest { - - private String name; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app119/SpringDocApp119Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app119/SpringDocApp119Test.java deleted file mode 100644 index e56979af0..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app119/SpringDocApp119Test.java +++ /dev/null @@ -1,12 +0,0 @@ -package test.org.springdoc.api.app119; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - - -public class SpringDocApp119Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app12/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app12/HelloController.java deleted file mode 100644 index 1dd6d5017..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app12/HelloController.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app12; - -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 org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping(value = "/persons") - @Operation(parameters = { - @Parameter(name = "name", in = ParameterIn.QUERY, schema = @Schema(implementation = String.class)) }) - public String persons() { - return "OK"; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app12/SpringDocApp12Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app12/SpringDocApp12Test.java deleted file mode 100644 index 8c36a7d82..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app12/SpringDocApp12Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app12; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp12Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app120/SpringDocApp120Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app120/SpringDocApp120Test.java deleted file mode 100644 index e942f5476..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app120/SpringDocApp120Test.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ -package test.org.springdoc.api.app120; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - - -/** - * Tests Spring meta-annotations as method parameters - */ -public class SpringDocApp120Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app121/InheritedRequestParams.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app121/InheritedRequestParams.java deleted file mode 100644 index f99c0b5a5..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app121/InheritedRequestParams.java +++ /dev/null @@ -1,20 +0,0 @@ -package test.org.springdoc.api.app121; - -import javax.validation.constraints.NotBlank; - -import io.swagger.v3.oas.annotations.Parameter; - -public class InheritedRequestParams extends RequestParams { - - @Parameter(description = "parameter from child of RequestParams") - @NotBlank - private String childParam; - - public String getChildParam() { - return childParam; - } - - public void setChildParam(String childParam) { - this.childParam = childParam; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app121/TestController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app121/TestController.java deleted file mode 100644 index a5e827717..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app121/TestController.java +++ /dev/null @@ -1,16 +0,0 @@ -package test.org.springdoc.api.app121; - -import org.springdoc.api.annotations.ParameterObject; - -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class TestController { - - @PostMapping("test") - public InheritedRequestParams getTest(@RequestParam String param, @ParameterObject InheritedRequestParams requestParams) { - return requestParams; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app123/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app123/HelloController.java deleted file mode 100644 index 7161342e7..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app123/HelloController.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app123; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.responses.ApiResponse; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping(value = "/hello/{numTelco}") - @Operation(summary = "GET Persons", responses = @ApiResponse(responseCode = "418")) - public T index(@PathVariable("numTelco") String numTel, String adresse) { - return null; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app124/MyExceptionHandler.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app124/MyExceptionHandler.java deleted file mode 100644 index cb434909c..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app124/MyExceptionHandler.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app124; - -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.bind.annotation.RestControllerAdvice; - -@RestControllerAdvice -public class MyExceptionHandler { - - @ExceptionHandler(RuntimeException.class) - @ResponseStatus(HttpStatus.BAD_GATEWAY) - public Object gateway(RuntimeException e) { - return null; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app125/DeprecatedEntity.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app125/DeprecatedEntity.java deleted file mode 100644 index 09b7ee6c6..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app125/DeprecatedEntity.java +++ /dev/null @@ -1,35 +0,0 @@ -package test.org.springdoc.api.app125; - -import io.swagger.v3.oas.annotations.media.Schema; - -/** - * @author bnasslahsen - */ -public class DeprecatedEntity -{ - @Schema(deprecated = false) - private String myNonDeprecatedField; - - @Schema(deprecated = true) - private String mydeprecatedField; - - public String getMyNonDeprecatedField() - { - return myNonDeprecatedField; - } - - @Deprecated - public DeprecatedEntity setMyNonDeprecatedField(String myNonDeprecatedField) - { - this.myNonDeprecatedField = myNonDeprecatedField; - return this; - } - - public String getMydeprecatedField() { - return mydeprecatedField; - } - - public void setMydeprecatedField(String mydeprecatedField) { - this.mydeprecatedField = mydeprecatedField; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app125/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app125/HelloController.java deleted file mode 100644 index ccd78c23f..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app125/HelloController.java +++ /dev/null @@ -1,25 +0,0 @@ -package test.org.springdoc.api.app125; - -import javax.validation.constraints.NotNull; - -import org.springdoc.api.annotations.ParameterObject; - -import org.springframework.data.domain.Pageable; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * @author bnasslahsen - */ -@RestController -public class HelloController { - - @GetMapping(value = "/search", produces = { "application/xml", "application/json" }) - public DeprecatedEntity getAllPets(@NotNull String toto) { - return null; - } - - @GetMapping(value = "/search2", produces = { "application/xml", "application/json" }) - public void getAllPets2(@ParameterObject Pageable pageable) { - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/AbstractObject.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/AbstractObject.java deleted file mode 100644 index 25f117f15..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/AbstractObject.java +++ /dev/null @@ -1,31 +0,0 @@ -package test.org.springdoc.api.app127; - -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.EXISTING_PROPERTY, - property = "type", - visible = true -) -@JsonSubTypes({ - @JsonSubTypes.Type(value = ConcreteObjectA.class, name = "Type A") -}) -public abstract class AbstractObject { - - private final ConcreteType type; - private final String name; - - protected AbstractObject(ConcreteType type, String name) { - this.type = type; - this.name = name; - } - - public ConcreteType getType() { - return type; - } - - public String getName() { - return name; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/ConcreteObjectA.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/ConcreteObjectA.java deleted file mode 100644 index 0f9d5af7d..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/ConcreteObjectA.java +++ /dev/null @@ -1,15 +0,0 @@ -package test.org.springdoc.api.app127; - -public class ConcreteObjectA extends AbstractObject { - - private final String description; - - public ConcreteObjectA(String name, String description) { - super(ConcreteType.TYPE_A, name); - this.description = description; - } - - public String getDescription() { - return description; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/ConcreteType.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/ConcreteType.java deleted file mode 100644 index ec3a72121..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/ConcreteType.java +++ /dev/null @@ -1,16 +0,0 @@ -package test.org.springdoc.api.app127; - -public enum ConcreteType { - TYPE_A("Type A"), - TYPE_B("Type B"); - - private final String name; - - ConcreteType(String name) { - this.name = name; - } - - public String getName() { - return name; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/Umbrella.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/Umbrella.java deleted file mode 100644 index f98c15683..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/Umbrella.java +++ /dev/null @@ -1,17 +0,0 @@ -package test.org.springdoc.api.app127; - -import io.swagger.v3.oas.annotations.media.Schema; - -public class Umbrella { - - @Schema(description = "This reference to abstract class causes weird YAML tag to be added", anyOf = ConcreteObjectA.class) - private final AbstractObject object; - - public Umbrella(AbstractObject object) { - this.object = object; - } - - public AbstractObject getObject() { - return object; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app128/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app128/HelloController.java deleted file mode 100644 index ea8209be8..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app128/HelloController.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app128; - - -import org.springframework.boot.actuate.endpoint.web.annotation.RestControllerEndpoint; -import org.springframework.stereotype.Component; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; - -@RestControllerEndpoint(id = "tenant") -@Component -public class HelloController { - - @GetMapping("/customer/{id}") - public String getTenantById(@PathVariable("id") String customerId) { - return "Tenant_" + customerId; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app129/ActualReturnedEntity.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app129/ActualReturnedEntity.java deleted file mode 100644 index f8a5c3fdf..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app129/ActualReturnedEntity.java +++ /dev/null @@ -1,10 +0,0 @@ -package test.org.springdoc.api.app129; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ActualReturnedEntity { - - @JsonProperty - String result; - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app129/OperationResponse.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app129/OperationResponse.java deleted file mode 100644 index 9dc4212b2..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app129/OperationResponse.java +++ /dev/null @@ -1,9 +0,0 @@ -package test.org.springdoc.api.app129; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class OperationResponse { - - @JsonProperty - String operationResult; -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app13/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app13/HelloController.java deleted file mode 100644 index e78d85c84..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app13/HelloController.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app13; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping(value = "/persons") - public String persons(final PersonDTO dto) { - return "OK"; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app13/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app13/PersonDTO.java deleted file mode 100644 index f81325808..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app13/PersonDTO.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app13; - -public class PersonDTO { - private String email; - - private String firstName; - - private String lastName; - - public PersonDTO() { - } - - public PersonDTO(final String email, final String firstName, final String lastName) { - this.email = email; - this.firstName = firstName; - this.lastName = lastName; - } - - public String getEmail() { - return email; - } - - public void setEmail(final String email) { - this.email = email; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(final String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(final String lastName) { - this.lastName = lastName; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app13/SpringDocApp13Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app13/SpringDocApp13Test.java deleted file mode 100644 index bc7621ecd..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app13/SpringDocApp13Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app13; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp13Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app130/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app130/HelloController.java deleted file mode 100644 index f9340ba42..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app130/HelloController.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app130; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @PostMapping(value = "/values/data") - TrackerData list(TrackerData toto) { - return toto; - } - - @GetMapping(value = "/values/datakk") - TrackerData get(TrackerData toto) { - return toto; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app130/TrackerData.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app130/TrackerData.java deleted file mode 100644 index d01bd60ba..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app130/TrackerData.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app130; - -import java.time.Instant; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.Hidden; -import io.swagger.v3.oas.annotations.media.Schema; - -@Hidden -public class TrackerData { - - @JsonProperty("trackerId") - String trackerId; - - @Schema(name = "timestamp", type = "string", format = "date-time", required = true, example = "2018-01-01T00:00:00Z") - @JsonProperty("timestamp") - Instant timestamp; - - @Schema(name = "value", type = "number", format = "double", description = "The data value", required = true, example = "19.0") - @JsonProperty("value") - Double value; - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app131/RestControllerError.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app131/RestControllerError.java deleted file mode 100644 index 4c7828ae0..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app131/RestControllerError.java +++ /dev/null @@ -1,13 +0,0 @@ -package test.org.springdoc.api.app131; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class RestControllerError { - - @JsonProperty - private String id; - - @JsonProperty - private String message; - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app132/RestControllerError.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app132/RestControllerError.java deleted file mode 100644 index a63a8f602..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app132/RestControllerError.java +++ /dev/null @@ -1,13 +0,0 @@ -package test.org.springdoc.api.app132; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class RestControllerError { - - @JsonProperty - private String id; - - @JsonProperty - private String message; - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app135/Book.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app135/Book.java deleted file mode 100644 index ae8713f1e..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app135/Book.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * - * * - * * * Copyright 2019-2020 the original author or authors. - * * * - * * * Licensed under the Apache License, Version 2.0 (the "License"); - * * * you may not use this file except in compliance with the License. - * * * You may obtain a copy of the License at - * * * - * * * https://www.apache.org/licenses/LICENSE-2.0 - * * * - * * * Unless required by applicable law or agreed to in writing, software - * * * distributed under the License is distributed on an "AS IS" BASIS, - * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * * See the License for the specific language governing permissions and - * * * limitations under the License. - * * - * - */ - -package test.org.springdoc.api.app135; - -public class Book { - - private String id; - private String title; - private String author; - - public Book(String id, String title, String author) { - this.id = id; - this.title = title; - this.author = author; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getAuthor() { - return author; - } - - public void setAuthor(String author) { - this.author = author; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app135/BookRepository.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app135/BookRepository.java deleted file mode 100644 index 85ed40695..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app135/BookRepository.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * - * * - * * * Copyright 2019-2020 the original author or authors. - * * * - * * * Licensed under the Apache License, Version 2.0 (the "License"); - * * * you may not use this file except in compliance with the License. - * * * You may obtain a copy of the License at - * * * - * * * https://www.apache.org/licenses/LICENSE-2.0 - * * * - * * * Unless required by applicable law or agreed to in writing, software - * * * distributed under the License is distributed on an "AS IS" BASIS, - * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * * See the License for the specific language governing permissions and - * * * limitations under the License. - * * - * - */ - -package test.org.springdoc.api.app135; - -import java.util.Arrays; -import java.util.List; - -import org.springframework.stereotype.Component; - -@Component -public class BookRepository { - - List findByAuthor(String author){ - Book[] books = {new Book("1", "title1","author1")}; - return Arrays.asList(books); - } - - List findAll() { - Book[] books = {new Book("2", "title2","author2")}; - return Arrays.asList(books); } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app137/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app137/HelloController.java deleted file mode 100644 index 3ff40aefc..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app137/HelloController.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app137; - -import io.swagger.v3.oas.annotations.security.SecurityRequirement; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@SecurityRequirement(name = "security_auth") -public class HelloController { - - @GetMapping("/test") - public void test(String hello) { - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app138/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app138/HelloController.java deleted file mode 100644 index 1caccc58a..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app138/HelloController.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app138; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping("/testB") - public void testB(String hello) { - } - - @GetMapping("/testA") - public void testA(String hello) { - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app139/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app139/HelloController.java deleted file mode 100644 index d017e0687..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app139/HelloController.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app139; - -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping(produces = MediaType.TEXT_PLAIN_VALUE, path = "/test1") - public String echo1(@RequestParam(name = "${test.name}", defaultValue = "${test.default-value}") String text) { - return text; - } - - @GetMapping(produces = MediaType.TEXT_PLAIN_VALUE, path = "/test2") - public String echo2(@RequestParam(value = "${test.value}", defaultValue = "${test.default-value}") String text) { - return text; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app14/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app14/HelloController.java deleted file mode 100644 index 1e9a617fa..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app14/HelloController.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app14; - -import javax.validation.Valid; -import javax.validation.constraints.NotBlank; - -import io.swagger.v3.oas.annotations.tags.Tag; - -import org.springframework.http.HttpEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@Tag(name = "greeting", description = "test") -public class HelloController { - - @GetMapping("/persons") - public void persons(@Valid @NotBlank String name) { - - } - - @GetMapping("/test") - @Tag(name = "lang.change") - public HttpEntity demo2() { - return null; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app14/SpringDocApp14Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app14/SpringDocApp14Test.java deleted file mode 100644 index 49a75735f..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app14/SpringDocApp14Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app14; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp14Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app143/HelloHiddenController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app143/HelloHiddenController.java deleted file mode 100644 index 76c59eb64..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app143/HelloHiddenController.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app143; - -import io.swagger.v3.oas.annotations.Hidden; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@Hidden -public class HelloHiddenController { - - @GetMapping("/testA") - public void testA(String hello) { - } - - @GetMapping("/testB") - public void testB(String hello) { - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app143/SpringDocApp143Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app143/SpringDocApp143Test.java deleted file mode 100644 index 944790f08..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app143/SpringDocApp143Test.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app143; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.test.context.TestPropertySource; - -/** - * Test issue 907 fix. - * Hidden controller showing up in swagger UI when springdoc.show-actuator is enabled - */ -@TestPropertySource(properties = {"management.endpoints.enabled-by-default=true", - "springdoc.show-actuator=true", "management.endpoints.web.exposure.exclude=functions" -}) -public class SpringDocApp143Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app144/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app144/HelloController.java deleted file mode 100644 index 59fee7564..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app144/HelloController.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app144; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping("/persons") - public String persons() { - return "OK"; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app145/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app145/HelloController.java deleted file mode 100644 index 12891a39e..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app145/HelloController.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app145; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping("/persons") - public String persons() { - return "OK"; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app146/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app146/HelloController.java deleted file mode 100644 index 9bacb38df..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app146/HelloController.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app146; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping("/persons") - public String persons() { - return "OK"; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app147/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app147/HelloController.java deleted file mode 100644 index c1f7985d7..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app147/HelloController.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app147; - -import org.springdoc.core.GroupedOpenApi; - -import org.springframework.context.annotation.Bean; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping("/persons") - public String persons() { - return "OK"; - } - - @Bean - public GroupedOpenApi userOpenApi() { - return GroupedOpenApi.builder() - .group("users") - .packagesToScan("test.org.springdoc.api.app147") - .build(); - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app148/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app148/HelloController.java deleted file mode 100644 index e2b55cba3..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app148/HelloController.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app148; - -import org.springdoc.core.GroupedOpenApi; - -import org.springframework.context.annotation.Bean; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping("/persons") - public String persons() { - return "OK"; - } - - @Bean - public GroupedOpenApi userOpenApi() { - return GroupedOpenApi.builder() - .group("users") - .packagesToScan("test.org.springdoc.api.app148") - .build(); - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app149/HelloMessage.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app149/HelloMessage.java deleted file mode 100644 index 35868daf0..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app149/HelloMessage.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app149; - -public class HelloMessage { - public String text; - public int number; - - public HelloMessage(String text, int number) { - this.text = text; - this.number = number; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app149/HiddenHelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app149/HiddenHelloController.java deleted file mode 100644 index addf06c49..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app149/HiddenHelloController.java +++ /dev/null @@ -1,22 +0,0 @@ -package test.org.springdoc.api.app149; - -import io.swagger.v3.oas.annotations.Operation; - -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * @author bnasslahsen - */ -@RestController -@RequestMapping("/api") -public class HiddenHelloController { - - @Operation(description = "I want here some custom config") - @GetMapping("/{entity}/{id}") - public ResponseEntity getEntity() { - throw new UnsupportedOperationException("the body is not relevant now"); - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app149/SpringDocApp149Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app149/SpringDocApp149Test.java deleted file mode 100644 index 135ea253a..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app149/SpringDocApp149Test.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app149; - -import org.junit.jupiter.api.BeforeAll; -import org.springdoc.core.SpringDocUtils; -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.test.context.TestPropertySource; - -@TestPropertySource(properties = "springdoc.model-and-view-allowed=true") -public class SpringDocApp149Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - - @BeforeAll - public static void init() { - SpringDocUtils.getConfig().addHiddenRestControllers(HiddenHelloController.class); - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app15/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app15/HelloController.java deleted file mode 100644 index e455a789b..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app15/HelloController.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app15; - -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 org.json.JSONObject; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping(value = "/persons") - @Operation(description = "${springdoc.operation-descriptions.myOperation}", responses = @ApiResponse(responseCode = "200", content = @Content(schema = @Schema(hidden = true)))) - public JSONObject persons() { - return new JSONObject(); - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app150/SpringDocApp150Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app150/SpringDocApp150Test.java deleted file mode 100644 index 447232fb8..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app150/SpringDocApp150Test.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app150; - - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * Tests Spring meta-annotations as method parameters - */ -public class SpringDocApp150Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app151/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app151/HelloController.java deleted file mode 100644 index f33ab8084..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app151/HelloController.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app151; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("/test") -public class HelloController { - - @GetMapping("") - /** - * A test endpoint mounted under `/test` - * @return 0 - */ - public int test() { - return 0; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app151/SpringDocApp151Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app151/SpringDocApp151Test.java deleted file mode 100644 index e8c84189d..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app151/SpringDocApp151Test.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app151; - - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * Tests Spring meta-annotations as method parameters - */ -public class SpringDocApp151Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app152/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app152/HelloController.java deleted file mode 100644 index 3901776a6..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app152/HelloController.java +++ /dev/null @@ -1,30 +0,0 @@ -package test.org.springdoc.api.app152; - -import org.springframework.context.annotation.Configuration; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; -import org.springframework.web.util.pattern.PathPatternParser; - -@RestController -@RequestMapping("/api") -public class HelloController { - - @GetMapping - public String helloWorld() { - return "ok"; - } - - @Configuration - public class WebConfig implements WebMvcConfigurer { - - @Override - public void configurePathMatch(PathMatchConfigurer configurer) { - configurer.setPatternParser(new PathPatternParser()); - } - - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app152/SpringDocApp152Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app152/SpringDocApp152Test.java deleted file mode 100644 index a3d99e6e7..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app152/SpringDocApp152Test.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app152; - - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * Tests Spring meta-annotations as method parameters - */ -public class SpringDocApp152Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app153/OrderState.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app153/OrderState.java deleted file mode 100644 index d6fa549f8..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app153/OrderState.java +++ /dev/null @@ -1,20 +0,0 @@ -package test.org.springdoc.api.app153; - -import io.swagger.v3.oas.annotations.media.Schema; - - -@Schema(type="string", allowableValues={"finished", "new"}) -public enum OrderState { - FINISHED("finished"), - NEW("new"); - - OrderState(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - private final String value; -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app153/OrderStateMapper.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app153/OrderStateMapper.java deleted file mode 100644 index b81256716..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app153/OrderStateMapper.java +++ /dev/null @@ -1,19 +0,0 @@ -package test.org.springdoc.api.app153; - -import java.beans.PropertyEditorSupport; -import java.util.Arrays; - -import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException; - -public class OrderStateMapper extends PropertyEditorSupport { - - @Override - public void setAsText(String text) { - setValue( - Arrays.stream(OrderState.class.getEnumConstants()) - .filter(e -> e.getValue().equals(text)) - .findFirst() - .orElseThrow(() -> new MethodArgumentTypeMismatchException( - text, OrderState.class, "orderState", null, null))); - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app153/SpringDocApp153Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app153/SpringDocApp153Test.java deleted file mode 100644 index d19252ff8..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app153/SpringDocApp153Test.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app153; - - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * Tests Spring meta-annotations as method parameters - */ -public class SpringDocApp153Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app153/TestController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app153/TestController.java deleted file mode 100644 index 4090efb96..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app153/TestController.java +++ /dev/null @@ -1,22 +0,0 @@ -package test.org.springdoc.api.app153; - -import org.springframework.web.bind.WebDataBinder; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.InitBinder; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -@RestController -class TestController { - - @InitBinder - public void initBinder(WebDataBinder dataBinder) { - dataBinder.registerCustomEditor(OrderState.class, new OrderStateMapper()); - } - - @GetMapping(value = {"/orders"}) - public Object method( - @RequestParam(value = "state", defaultValue = "finished") OrderState orderState) { - return null; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app154/SpringDocApp154Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app154/SpringDocApp154Test.java deleted file mode 100644 index 6334350b0..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app154/SpringDocApp154Test.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app154; - - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * Tests Spring meta-annotations as method parameters - */ -public class SpringDocApp154Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/AbstractIntParameterObject.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/AbstractIntParameterObject.java deleted file mode 100644 index db60532a9..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/AbstractIntParameterObject.java +++ /dev/null @@ -1,24 +0,0 @@ -package test.org.springdoc.api.app155; - -public class AbstractIntParameterObject { - - int primitiveBaseField; - - T genericField; - - public int getPrimitiveBaseField() { - return primitiveBaseField; - } - - public void setPrimitiveBaseField(int primitiveBaseField) { - this.primitiveBaseField = primitiveBaseField; - } - - public T getGenericField() { - return genericField; - } - - public void setGenericField(T genericField) { - this.genericField = genericField; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/AbstractParameterObject.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/AbstractParameterObject.java deleted file mode 100644 index 80b99fad6..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/AbstractParameterObject.java +++ /dev/null @@ -1,28 +0,0 @@ -package test.org.springdoc.api.app155; - -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; - -public class AbstractParameterObject> { - - int primitiveBaseField; - - @Parameter(schema=@Schema(type = "string", allowableValues = {"ONE", "TWO"}) ) - T genericField; - - public int getPrimitiveBaseField() { - return primitiveBaseField; - } - - public void setPrimitiveBaseField(int primitiveBaseField) { - this.primitiveBaseField = primitiveBaseField; - } - - public T getGenericField() { - return genericField; - } - - public void setGenericField(T genericField) { - this.genericField = genericField; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/ConcreteEnum.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/ConcreteEnum.java deleted file mode 100644 index 25a18d1bf..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/ConcreteEnum.java +++ /dev/null @@ -1,9 +0,0 @@ -package test.org.springdoc.api.app155; - - - -enum ConcreteEnum { - ONE, - TWO - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/ConcreteIntParameterObject.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/ConcreteIntParameterObject.java deleted file mode 100644 index 1005d9e40..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/ConcreteIntParameterObject.java +++ /dev/null @@ -1,14 +0,0 @@ -package test.org.springdoc.api.app155; - -public class ConcreteIntParameterObject extends AbstractIntParameterObject{ - - int primitiveConcreteField; - - public int getPrimitiveConcreteField() { - return primitiveConcreteField; - } - - public void setPrimitiveConcreteField(int primitiveConcreteField) { - this.primitiveConcreteField = primitiveConcreteField; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/ConcreteParameterObject.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/ConcreteParameterObject.java deleted file mode 100644 index 93cfe32d6..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/ConcreteParameterObject.java +++ /dev/null @@ -1,14 +0,0 @@ -package test.org.springdoc.api.app155; - -public class ConcreteParameterObject extends AbstractParameterObject { - - int primitiveConcreteField; - - public int getPrimitiveConcreteField() { - return primitiveConcreteField; - } - - public void setPrimitiveConcreteField(int primitiveConcreteField) { - this.primitiveConcreteField = primitiveConcreteField; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/SpringDocApp155Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/SpringDocApp155Test.java deleted file mode 100644 index 9b72b5c65..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/SpringDocApp155Test.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app155; - - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * Tests Spring meta-annotations as method parameters - */ -public class SpringDocApp155Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app156/SomeEnum.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app156/SomeEnum.java deleted file mode 100644 index d35f04b09..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app156/SomeEnum.java +++ /dev/null @@ -1,6 +0,0 @@ -package test.org.springdoc.api.app156; - -public enum SomeEnum { - FIRST, - SECOND -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app156/SpringDocApp156Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app156/SpringDocApp156Test.java deleted file mode 100644 index f07cede85..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app156/SpringDocApp156Test.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app156; - - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * Tests Spring meta-annotations as method parameters - */ -public class SpringDocApp156Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app156/User.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app156/User.java deleted file mode 100644 index 93699c932..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app156/User.java +++ /dev/null @@ -1,33 +0,0 @@ -package test.org.springdoc.api.app156; - -import java.util.Set; - -public class User { - private String someText; - private Set textSet; - private Set someEnums; - - public String getSomeText() { - return someText; - } - - public void setSomeText(String someText) { - this.someText = someText; - } - - public Set getTextSet() { - return textSet; - } - - public void setTextSet(Set textSet) { - this.textSet = textSet; - } - - public Set getSomeEnums() { - return someEnums; - } - - public void setSomeEnums(Set someEnums) { - this.someEnums = someEnums; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app157/Bar.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app157/Bar.java deleted file mode 100644 index 8c9ea08d4..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app157/Bar.java +++ /dev/null @@ -1,12 +0,0 @@ -package test.org.springdoc.api.app157; - -/** - * A class without a String in it - */ -public class Bar { - private Object child; - - public Object getChild() { - return this.child; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app157/Foo.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app157/Foo.java deleted file mode 100644 index c139567b2..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app157/Foo.java +++ /dev/null @@ -1,12 +0,0 @@ -package test.org.springdoc.api.app157; - -/** - * A class with a String in it - */ -public class Foo { - private String child; - - public String getChild() { - return this.child; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app157/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app157/HelloController.java deleted file mode 100644 index 10a514ba1..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app157/HelloController.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app157; - -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * Put Foo and Bar in the schema's components, make sure there is an ignored wrapper - * ({@code ResponseEntity}). - */ -@RestController -public class HelloController { - - @GetMapping( "/foo") - public ResponseEntity getFoo() { - return new ResponseEntity(HttpStatus.OK); - } - - @GetMapping( "/bar") - public ResponseEntity getBar() { - return new ResponseEntity(HttpStatus.OK); - } - - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app157/StringyConverter.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app157/StringyConverter.java deleted file mode 100644 index f2717ad09..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app157/StringyConverter.java +++ /dev/null @@ -1,25 +0,0 @@ -package test.org.springdoc.api.app157; - -import java.util.Iterator; - -import com.fasterxml.jackson.databind.JavaType; -import io.swagger.v3.core.converter.AnnotatedType; -import io.swagger.v3.core.converter.ModelConverter; -import io.swagger.v3.core.converter.ModelConverterContext; -import io.swagger.v3.core.util.Json; -import io.swagger.v3.oas.models.media.Schema; - -public class StringyConverter implements ModelConverter { - - @Override - public Schema resolve(AnnotatedType type, ModelConverterContext context, - Iterator chain) { - - JavaType javaType = Json.mapper().constructType(type.getType()); - - if (javaType.getRawClass().equals(String.class)) { - type.getParent().addRequiredItem("stringy"); - } - return chain.next().resolve(type, context, chain); - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/CommonFooErrorHandler.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/CommonFooErrorHandler.java deleted file mode 100644 index b0593a696..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/CommonFooErrorHandler.java +++ /dev/null @@ -1,14 +0,0 @@ -package test.org.springdoc.api.app158; - -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.ResponseStatus; - -public class CommonFooErrorHandler { - - @ExceptionHandler - @ResponseStatus(HttpStatus.CONFLICT) - public ErrorDTO onException(Exception e) { - return new ErrorDTO("Something wrong has happened"); - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/ErrorDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/ErrorDTO.java deleted file mode 100644 index 7768cd658..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/ErrorDTO.java +++ /dev/null @@ -1,20 +0,0 @@ -package test.org.springdoc.api.app158; - -public class ErrorDTO { - private String message; - - public ErrorDTO() { - } - - public ErrorDTO(String message) { - this.message = message; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/HelloController.java deleted file mode 100644 index 99ff55c14..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/HelloController.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app158; - -import io.swagger.v3.oas.annotations.OpenAPIDefinition; -import io.swagger.v3.oas.annotations.info.Info; -import io.swagger.v3.oas.annotations.tags.Tag; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("/api") -@OpenAPIDefinition(info = @Info(title = "API Examples", version = "1.0"), tags = @Tag(name = "Operations")) -public class HelloController { - - @GetMapping("/foo") - public SimpleDTO hello() { - return new SimpleDTO("foo"); - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/SimpleDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/SimpleDTO.java deleted file mode 100644 index b3937de4d..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/SimpleDTO.java +++ /dev/null @@ -1,22 +0,0 @@ -package test.org.springdoc.api.app158; - -public class SimpleDTO { - - private String payload; - - public SimpleDTO() { - } - - public SimpleDTO(String payload) { - this.payload = payload; - } - - public String getPayload() { - return payload; - } - - public void setPayload(String payload) { - this.payload = payload; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/SpecificFooErrorHandler.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/SpecificFooErrorHandler.java deleted file mode 100644 index ecff65cbe..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/SpecificFooErrorHandler.java +++ /dev/null @@ -1,7 +0,0 @@ -package test.org.springdoc.api.app158; - -import org.springframework.web.bind.annotation.ControllerAdvice; - -@ControllerAdvice(assignableTypes = HelloController.class) -public class SpecificFooErrorHandler extends CommonFooErrorHandler { -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/SpringDocApp158Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/SpringDocApp158Test.java deleted file mode 100644 index af260e6c4..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app158/SpringDocApp158Test.java +++ /dev/null @@ -1,12 +0,0 @@ -package test.org.springdoc.api.app158; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp158Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/CustomException.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/CustomException.java deleted file mode 100644 index 1354597e2..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/CustomException.java +++ /dev/null @@ -1,7 +0,0 @@ -package test.org.springdoc.api.app159; - -public class CustomException extends RuntimeException{ - public CustomException(String message) { - super(message); - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/FooBean.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/FooBean.java deleted file mode 100644 index 0460e74d3..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/FooBean.java +++ /dev/null @@ -1,31 +0,0 @@ -package test.org.springdoc.api.app159; - -import com.fasterxml.jackson.annotation.JsonView; - -public class FooBean { - @JsonView(Views.View2.class) - private String message; - @JsonView(Views.View1.class) - private int code; - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public FooBean(String message, int code) { - this.message = message; - this.code = code; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/HelloController.java deleted file mode 100644 index 99d53a7bc..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/HelloController.java +++ /dev/null @@ -1,22 +0,0 @@ -package test.org.springdoc.api.app159; - -import io.swagger.v3.oas.annotations.OpenAPIDefinition; -import io.swagger.v3.oas.annotations.info.Info; -import io.swagger.v3.oas.annotations.tags.Tag; - -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("/api") -@OpenAPIDefinition(info = @Info(title = "API Examples", version = "1.0"), tags = @Tag(name = "Operations")) -public class HelloController { - - @PostMapping("/foo") - public String create(@RequestBody String foo) { - return "foo"; - } -} - diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/SpringDocApp159Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/SpringDocApp159Test.java deleted file mode 100644 index 1cdb16b13..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/SpringDocApp159Test.java +++ /dev/null @@ -1,12 +0,0 @@ -package test.org.springdoc.api.app159; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp159Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/Views.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/Views.java deleted file mode 100644 index 78e778372..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/Views.java +++ /dev/null @@ -1,8 +0,0 @@ -package test.org.springdoc.api.app159; - -public class Views { - public static class View1 { - } - public static class View2 extends View1 { - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app16/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app16/HelloController.java deleted file mode 100644 index ca142af67..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app16/HelloController.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app16; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping("/persons") - public String persons() { - return "OK"; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app16/SpringDocApp16Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app16/SpringDocApp16Test.java deleted file mode 100644 index 8a8f4be6a..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app16/SpringDocApp16Test.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app16; - -import org.junit.jupiter.api.Test; -import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.SpringBootConfiguration; -import org.springframework.test.context.TestPropertySource; - -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - -@TestPropertySource(properties = "springdoc.api-docs.enabled=false") -public class SpringDocApp16Test extends AbstractSpringDocTest { - - @Test - public void testApp() throws Exception { - mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)) - .andExpect(status().isNotFound()); - } - - @SpringBootConfiguration - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app160/SpringDocApp160Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app160/SpringDocApp160Test.java deleted file mode 100644 index f50e4e00f..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app160/SpringDocApp160Test.java +++ /dev/null @@ -1,31 +0,0 @@ -package test.org.springdoc.api.app160; - -import org.junit.jupiter.api.Test; -import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.test.context.TestPropertySource; - -import static org.hamcrest.Matchers.is; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - -@TestPropertySource(properties = "springdoc.api-docs.resolve-schema-properties=true") -public class SpringDocApp160Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp { - } - - - @Test - public void testApp2() throws Exception { - mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/test")) - .andExpect(status().isOk()) - .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app160-1.json"), true)); - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app161/SpringDocApp161Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app161/SpringDocApp161Test.java deleted file mode 100644 index 3f29e6ea2..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app161/SpringDocApp161Test.java +++ /dev/null @@ -1,21 +0,0 @@ -package test.org.springdoc.api.app161; - -import java.util.Locale; - -import org.junit.jupiter.api.Test; -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp161Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - - @Test - public void testApp() throws Exception { - Locale.setDefault(Locale.US); - super.testApp(); - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app162/OpenApiConfig.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app162/OpenApiConfig.java deleted file mode 100644 index 85bd53efc..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app162/OpenApiConfig.java +++ /dev/null @@ -1,24 +0,0 @@ -package test.org.springdoc.api.app162; - -import java.util.ArrayList; -import java.util.List; - -import io.swagger.v3.oas.models.servers.Server; -import org.springdoc.core.customizers.OpenApiCustomiser; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -@Configuration -public class OpenApiConfig { - @Bean - OpenApiCustomiser openApiCustomiser() { - return openApi -> { - openApi.getInfo().version("v1"); - Server server = new Server().url(""); - List servers=new ArrayList<>(); - servers.add(server); - openApi.servers(servers); - }; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app162/SpringDocApp162Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app162/SpringDocApp162Test.java deleted file mode 100644 index 9fd72a9f6..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app162/SpringDocApp162Test.java +++ /dev/null @@ -1,18 +0,0 @@ -package test.org.springdoc.api.app162; - -import org.junit.jupiter.api.Test; -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp162Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - - @Test - public void testApp2() throws Exception { - super.testApp(); - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app163/ExampleRegistrationCustomizer.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app163/ExampleRegistrationCustomizer.java deleted file mode 100644 index 8aaec28e1..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app163/ExampleRegistrationCustomizer.java +++ /dev/null @@ -1,25 +0,0 @@ -package test.org.springdoc.api.app163; - -import java.util.List; -import java.util.Map; - -import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.examples.Example; -import org.springdoc.core.customizers.OpenApiCustomiser; - -import org.springframework.stereotype.Component; - -@Component -public class ExampleRegistrationCustomizer implements OpenApiCustomiser { - - private final List> examplesToRegister; - - public ExampleRegistrationCustomizer(List> examplesToRegister) { - this.examplesToRegister = examplesToRegister; - } - - @Override - public void customise(OpenAPI openApi) { - examplesToRegister.forEach(entry -> openApi.getComponents().addExamples(entry.getKey(), entry.getValue())); - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app163/SpringDocApp163Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app163/SpringDocApp163Test.java deleted file mode 100644 index 96fb87ed5..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app163/SpringDocApp163Test.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * * Copyright 2019-2021 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app163; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.Import; - -public class SpringDocApp163Test extends AbstractSpringDocTest { - - @SpringBootApplication - @Import({ Examples.class, ExampleRegistrationCustomizer.class }) - static class SpringDocTestApp { - - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app164/SpringDocApp164Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app164/SpringDocApp164Test.java deleted file mode 100644 index 6283b21d9..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app164/SpringDocApp164Test.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * * Copyright 2019-2021 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app164; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.test.context.TestPropertySource; - -@TestPropertySource(properties = "springdoc.api-docs.resolve-schema-properties=true") -public class SpringDocApp164Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp { - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app164/TestApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app164/TestApiController.java deleted file mode 100644 index 1674e67bf..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app164/TestApiController.java +++ /dev/null @@ -1,14 +0,0 @@ -package test.org.springdoc.api.app164; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class TestApiController { - - @GetMapping(value = "/test") - public SampleResponseClass getInvoices() { - return null; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app165/SpringDocApp165Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app165/SpringDocApp165Test.java deleted file mode 100644 index 5187ed8d8..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app165/SpringDocApp165Test.java +++ /dev/null @@ -1,13 +0,0 @@ -package test.org.springdoc.api.app165; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp165Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app166/GlobalErrorResponseDto.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app166/GlobalErrorResponseDto.java deleted file mode 100644 index 637358763..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app166/GlobalErrorResponseDto.java +++ /dev/null @@ -1,18 +0,0 @@ -package test.org.springdoc.api.app166; - -public class GlobalErrorResponseDto { - - private String globalMessage; - - public GlobalErrorResponseDto(String globalMessage) { - this.globalMessage = globalMessage; - } - - public String getGlobalMessage() { - return globalMessage; - } - - public void setGlobalMessage(String globalMessage) { - this.globalMessage = globalMessage; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app166/GlobalExceptionHandler.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app166/GlobalExceptionHandler.java deleted file mode 100644 index 7cebb142a..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app166/GlobalExceptionHandler.java +++ /dev/null @@ -1,17 +0,0 @@ -package test.org.springdoc.api.app166; - -import org.springframework.stereotype.Component; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.bind.annotation.RestControllerAdvice; - -@RestControllerAdvice -@Component("1") // bean name override to simulate order in HashMap -public class GlobalExceptionHandler { - - @ExceptionHandler(RuntimeException.class) - @ResponseStatus - public GlobalErrorResponseDto processException() { - return new GlobalErrorResponseDto("global"); - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app166/LocalErrorResponseDto.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app166/LocalErrorResponseDto.java deleted file mode 100644 index 45f9adb52..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app166/LocalErrorResponseDto.java +++ /dev/null @@ -1,18 +0,0 @@ -package test.org.springdoc.api.app166; - -public class LocalErrorResponseDto { - - private String localMessage; - - public LocalErrorResponseDto(String localMessage) { - this.localMessage = localMessage; - } - - public String getLocalMessage() { - return localMessage; - } - - public void setLocalMessage(String localMessage) { - this.localMessage = localMessage; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app166/SpringDocApp166Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app166/SpringDocApp166Test.java deleted file mode 100644 index 3c2b3045e..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app166/SpringDocApp166Test.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * - * * Copyright 2019-2021 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app166; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.test.context.TestPropertySource; - -/** - * In this test, it is checked that the error handler is displayed correctly in the documentation. - * Exactly, that the local handler takes precedence over the global one - * */ -@TestPropertySource(properties = "springdoc.api-docs.resolve-schema-properties=true") -public class SpringDocApp166Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp { - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app166/TestApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app166/TestApiController.java deleted file mode 100644 index fcfa0e2a9..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app166/TestApiController.java +++ /dev/null @@ -1,23 +0,0 @@ -package test.org.springdoc.api.app166; - -import org.springframework.stereotype.Component; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@Component("0") // bean name override to simulate order in HashMap -public class TestApiController { - - @GetMapping(value = "/test") - public String throwError() { - throw new IllegalArgumentException(); - } - - @ExceptionHandler(RuntimeException.class) - @ResponseStatus - public LocalErrorResponseDto processException() { - return new LocalErrorResponseDto("local"); - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app167/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app167/HelloController.java deleted file mode 100644 index f531733e5..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app167/HelloController.java +++ /dev/null @@ -1,23 +0,0 @@ -package test.org.springdoc.api.app167; - -import io.swagger.v3.oas.annotations.Parameter; - -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * @author bnasslahsen - */ -@RestController -@RequestMapping("/api") -public class HelloController { - - @GetMapping("/sample1") - public ResponseEntity sample1(@Parameter(name="mySample") String mySample) { - throw new UnsupportedOperationException("the body is not relevant now"); - } - - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app167/SpringDocApp167Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app167/SpringDocApp167Test.java deleted file mode 100644 index b4cc34fe9..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app167/SpringDocApp167Test.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * * Copyright 2019-2021 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app167; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.test.context.TestPropertySource; - - -@TestPropertySource(properties = "springdoc.disable-i18n=true") -public class SpringDocApp167Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp { - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app168/SpringDocApp168Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app168/SpringDocApp168Test.java deleted file mode 100644 index a7e1e9cea..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app168/SpringDocApp168Test.java +++ /dev/null @@ -1,28 +0,0 @@ -package test.org.springdoc.api.app168; - -import java.util.Optional; - -import io.swagger.v3.core.converter.ModelConverter; -import io.swagger.v3.core.converter.ModelConverters; -import org.springdoc.core.Constants; -import org.springdoc.core.converters.PolymorphicModelConverter; -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.test.context.TestPropertySource; - - -@TestPropertySource(properties = Constants.SPRINGDOC_POLYMORPHIC_CONVERTER_ENABLED + "=false") -public class SpringDocApp168Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - - static { - Optional modelConverterOptional = - ModelConverters.getInstance().getConverters() - .stream().filter(modelConverter -> modelConverter instanceof PolymorphicModelConverter).findAny(); - modelConverterOptional.ifPresent(ModelConverters.getInstance()::removeConverter); - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app169/DefaultWebMvcRegistrations.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app169/DefaultWebMvcRegistrations.java deleted file mode 100644 index 137371783..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app169/DefaultWebMvcRegistrations.java +++ /dev/null @@ -1,15 +0,0 @@ -package test.org.springdoc.api.app169; - -import org.springframework.boot.autoconfigure.web.servlet.WebMvcRegistrations; -import org.springframework.stereotype.Component; -import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; - -@Component -public class DefaultWebMvcRegistrations implements WebMvcRegistrations { - - @Override - public RequestMappingHandlerMapping getRequestMappingHandlerMapping() { - return new DefaultRequestMappingHandlerMapping(); - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app169/SpringDocApp169Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app169/SpringDocApp169Test.java deleted file mode 100644 index ff0c28990..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app169/SpringDocApp169Test.java +++ /dev/null @@ -1,13 +0,0 @@ -package test.org.springdoc.api.app169; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - - -public class SpringDocApp169Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app169/TestController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app169/TestController.java deleted file mode 100644 index 54fdaacac..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app169/TestController.java +++ /dev/null @@ -1,13 +0,0 @@ -package test.org.springdoc.api.app169; - -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class TestController { - - @PostMapping("/echo") - public String echo(String content) { - return content; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app17/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app17/HelloController.java deleted file mode 100644 index 4ce1d114a..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app17/HelloController.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app17; - -import javax.validation.Valid; -import javax.validation.constraints.Size; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping(value = "/persons") - public void persons(@Valid @RequestParam @Size(min = 4, max = 6) String name) { - - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app17/SpringDocApp17Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app17/SpringDocApp17Test.java deleted file mode 100644 index 982f4ec82..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app17/SpringDocApp17Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app17; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp17Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app170/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app170/HelloController.java deleted file mode 100644 index 73a874a1e..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app170/HelloController.java +++ /dev/null @@ -1,12 +0,0 @@ -package test.org.springdoc.api.app170; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - @GetMapping("hello") - public String hello() { - return "Hello"; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app170/SpringDocApp170Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app170/SpringDocApp170Test.java deleted file mode 100644 index 0b9b19584..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app170/SpringDocApp170Test.java +++ /dev/null @@ -1,26 +0,0 @@ -package test.org.springdoc.api.app170; - -import org.junit.jupiter.api.Test; -import org.springdoc.core.customizers.OpenApiCustomiser; -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.Bean; - - -public class SpringDocApp170Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp { - @Bean - public OpenApiCustomiser openApiCustomiser() { - return openApi -> openApi.getServers().forEach(s -> s.url("URL")); - } - } - - @Test - public void testApp1() throws Exception { - this.testApp(); - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app171/HelloLocaleController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app171/HelloLocaleController.java deleted file mode 100644 index 5d8be0a91..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app171/HelloLocaleController.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app171; - -import javax.validation.Valid; -import javax.validation.constraints.NotBlank; - -import io.swagger.v3.oas.annotations.tags.Tag; - -import org.springframework.http.HttpEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@Tag(name = "greeting", description = "test") -public class HelloLocaleController { - - @GetMapping("/persons") - public void persons(@Valid @NotBlank String name) { - } - - @GetMapping("/test") - public HttpEntity demo2() { - return null; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app172/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app172/HelloController.java deleted file mode 100644 index 818ab459b..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app172/HelloController.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app172; - - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping("/customer/{id}") - public String getTenantById(@PathVariable("id") String customerId) { - return "Tenant_" + customerId; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app173/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app173/HelloController.java deleted file mode 100644 index ac0ee2eea..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app173/HelloController.java +++ /dev/null @@ -1,13 +0,0 @@ -package test.org.springdoc.api.app173; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping("/test") - public void printHello() { - System.out.println("Hello"); - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app174/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app174/PersonDTO.java deleted file mode 100644 index 2ba7bc4fb..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app174/PersonDTO.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app174; - -public class PersonDTO { - private String email; - - private String firstName; - - private String lastName; - - public PersonDTO() { - } - - public PersonDTO(final String email, final String firstName, final String lastName) { - this.email = email; - this.firstName = firstName; - this.lastName = lastName; - } - - public String getEmail() { - return email; - } - - public void setEmail(final String email) { - this.email = email; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(final String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(final String lastName) { - this.lastName = lastName; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app175/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app175/PersonDTO.java deleted file mode 100644 index ee4ed2488..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app175/PersonDTO.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app175; - -public class PersonDTO { - private String email; - - private String firstName; - - private String lastName; - - public PersonDTO() { - } - - public PersonDTO(final String email, final String firstName, final String lastName) { - this.email = email; - this.firstName = firstName; - this.lastName = lastName; - } - - public String getEmail() { - return email; - } - - public void setEmail(final String email) { - this.email = email; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(final String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(final String lastName) { - this.lastName = lastName; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app176/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app176/PersonDTO.java deleted file mode 100644 index 6950a1d87..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app176/PersonDTO.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app176; - -import io.swagger.v3.oas.annotations.media.Schema; - -@Schema -public class PersonDTO { - private String email; - - private String firstName; - - private String lastName; - - public PersonDTO() { - } - - public PersonDTO(final String email, final String firstName, final String lastName) { - this.email = email; - this.firstName = firstName; - this.lastName = lastName; - } - - public String getEmail() { - return email; - } - - public void setEmail(final String email) { - this.email = email; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(final String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(final String lastName) { - this.lastName = lastName; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/HelloController.java deleted file mode 100644 index 9eee0c6b7..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/HelloController.java +++ /dev/null @@ -1,13 +0,0 @@ -package test.org.springdoc.api.app179; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - - -@RestController -public class HelloController { - @GetMapping("/test/{objId}") - String test(@MyIdPathVariable MyObj obj) { - return obj.getContent(); - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/MyConfiguration.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/MyConfiguration.java deleted file mode 100644 index 3409de162..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/MyConfiguration.java +++ /dev/null @@ -1,15 +0,0 @@ -package test.org.springdoc.api.app179; - -import java.util.List; - -import org.springframework.context.annotation.Configuration; -import org.springframework.web.method.support.HandlerMethodArgumentResolver; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; - -@Configuration -public class MyConfiguration implements WebMvcConfigurer { - @Override - public void addArgumentResolvers(List resolvers) { - resolvers.add(new MyObjArgumentResolver()); - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/MyIdPathVariable.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/MyIdPathVariable.java deleted file mode 100644 index 6b1860be2..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/MyIdPathVariable.java +++ /dev/null @@ -1,11 +0,0 @@ -package test.org.springdoc.api.app179; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.PARAMETER) -public @interface MyIdPathVariable { -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/MyObj.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/MyObj.java deleted file mode 100644 index 4a25da205..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/MyObj.java +++ /dev/null @@ -1,19 +0,0 @@ -package test.org.springdoc.api.app179; - -public class MyObj { - private final String id; - private final String content; - - public MyObj(String id, String content) { - this.id = id; - this.content = content; - } - - public String getId() { - return id; - } - - public String getContent() { - return content; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/MyPathParameterCustomizer.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/MyPathParameterCustomizer.java deleted file mode 100644 index edfed5b76..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/MyPathParameterCustomizer.java +++ /dev/null @@ -1,23 +0,0 @@ -package test.org.springdoc.api.app179; - -import io.swagger.v3.oas.models.media.StringSchema; -import io.swagger.v3.oas.models.parameters.Parameter; -import io.swagger.v3.oas.models.parameters.PathParameter; -import org.springdoc.core.customizers.ParameterCustomizer; - -import org.springframework.core.MethodParameter; -import org.springframework.stereotype.Component; - -@Component -public class MyPathParameterCustomizer implements ParameterCustomizer { - @Override - public Parameter customize(Parameter parameterModel, MethodParameter methodParameter) { - if (methodParameter.hasParameterAnnotation(MyIdPathVariable.class)) { - Parameter alternativeParameter = new PathParameter(); - alternativeParameter.setName("objId"); - alternativeParameter.setSchema(new StringSchema()); - return alternativeParameter; - } - return parameterModel; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/SpringDocApp179Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/SpringDocApp179Test.java deleted file mode 100644 index b06738036..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/SpringDocApp179Test.java +++ /dev/null @@ -1,11 +0,0 @@ -package test.org.springdoc.api.app179; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp179Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app18/SpringDocApp18Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app18/SpringDocApp18Test.java deleted file mode 100644 index b4a07fcf2..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app18/SpringDocApp18Test.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app18; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.test.context.TestPropertySource; - -@TestPropertySource(properties = "springdoc.pre-loading-enabled=true") -public class SpringDocApp18Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app180/MapExclusion.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app180/MapExclusion.java deleted file mode 100644 index 316a0514f..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app180/MapExclusion.java +++ /dev/null @@ -1,8 +0,0 @@ -package test.org.springdoc.api.app180; - -import com.fasterxml.jackson.annotation.JsonIgnore; - -public interface MapExclusion { - @JsonIgnore - boolean isEmpty(); -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app181/AbstractParameterObject.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app181/AbstractParameterObject.java deleted file mode 100644 index 9e9837281..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app181/AbstractParameterObject.java +++ /dev/null @@ -1,24 +0,0 @@ -package test.org.springdoc.api.app181; - -public class AbstractParameterObject { - - int primitiveBaseField; - - T genericField; - - public int getPrimitiveBaseField() { - return primitiveBaseField; - } - - public void setPrimitiveBaseField(int primitiveBaseField) { - this.primitiveBaseField = primitiveBaseField; - } - - public T getGenericField() { - return genericField; - } - - public void setGenericField(T genericField) { - this.genericField = genericField; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app181/ConcreteParameterObject.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app181/ConcreteParameterObject.java deleted file mode 100644 index 7684c6ed9..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app181/ConcreteParameterObject.java +++ /dev/null @@ -1,14 +0,0 @@ -package test.org.springdoc.api.app181; - -public class ConcreteParameterObject extends AbstractParameterObject { - - int primitiveConcreteField; - - public int getPrimitiveConcreteField() { - return primitiveConcreteField; - } - - public void setPrimitiveConcreteField(int primitiveConcreteField) { - this.primitiveConcreteField = primitiveConcreteField; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app181/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app181/HelloController.java deleted file mode 100644 index c2502a6fd..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app181/HelloController.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app181; - -import org.springdoc.api.annotations.ParameterObject; - -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping( "/test1") - public ResponseEntity sayHello( @ParameterObject final ConcreteParameterObject test) { - System.out.println("Field B = " + test); - return new ResponseEntity("{\"Say\": \"Hello\"}", HttpStatus.OK); - } - - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app181/SpringDocApp181Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app181/SpringDocApp181Test.java deleted file mode 100644 index a2169de0a..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app181/SpringDocApp181Test.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app181; - - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * Tests Spring meta-annotations as method parameters - */ -public class SpringDocApp181Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app182/SpringDocApp182Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app182/SpringDocApp182Test.java deleted file mode 100644 index b34c5d436..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app182/SpringDocApp182Test.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app182; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - - -/** - * Copy of 124 without RestControllerAdvice class - */ -public class SpringDocApp182Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app183/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app183/HelloController.java deleted file mode 100644 index 7da9d7813..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app183/HelloController.java +++ /dev/null @@ -1,25 +0,0 @@ -package test.org.springdoc.api.app183; - -import io.swagger.v3.oas.annotations.tags.Tag; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RestController; - -/** - * The type Hello controller. - */ -@RestController -@Tag(name = "NetworkServices", description = "the NetworkServices API") -public class HelloController { - - - - - @GetMapping("/{userId}") - public User doSomething(@PathVariable("userId") User user) { - return new User(user.getId(), "tototot"); - } - - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app183/SpringDocApp183Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app183/SpringDocApp183Test.java deleted file mode 100644 index f242af7b6..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app183/SpringDocApp183Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app183; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp183Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app183/User.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app183/User.java deleted file mode 100644 index 17327962a..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app183/User.java +++ /dev/null @@ -1,41 +0,0 @@ -package test.org.springdoc.api.app183; - -public class User { - - String id; - - String toto; - - - public User() { - } - - public User(String id, String toto) { - this.id = id; - this.toto = toto; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getToto() { - return toto; - } - - public void setToto(String toto) { - this.toto = toto; - } - - @Override - public String toString() { - return "User{" + - "id='" + id + '\'' + - ", toto='" + toto + '\'' + - '}'; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app183/UserConverter.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app183/UserConverter.java deleted file mode 100644 index a42276d23..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app183/UserConverter.java +++ /dev/null @@ -1,14 +0,0 @@ -package test.org.springdoc.api.app183; - -import org.springframework.core.convert.converter.Converter; - -public class UserConverter implements Converter { - - @Override - public User convert(String userId) { - // Fetch from repository - User user = new User(); - user.setId(userId); - return user; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app183/WebConfig.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app183/WebConfig.java deleted file mode 100644 index 93cd8d261..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app183/WebConfig.java +++ /dev/null @@ -1,15 +0,0 @@ -package test.org.springdoc.api.app183; - -import org.springframework.context.annotation.Configuration; -import org.springframework.format.FormatterRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; - -@Configuration -public class WebConfig implements WebMvcConfigurer { - - @Override - public void addFormatters(FormatterRegistry registry) { - registry.addConverter(new UserConverter()); - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app184/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app184/HelloController.java deleted file mode 100644 index a38bd2590..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app184/HelloController.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * - * * Copyright 2019-2022 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app184; - - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping("/globalBeanFiltered") - public String globalBeanFiltered() { - return "globalBeanFiltered"; - } - - @GetMapping("/beanFiltered") - public String beanFiltered() { - return "beanFiltered"; - } - - @GetMapping("/group1Filtered") - public String group1Filtered() { - return "group1Filtered"; - } - - @GetMapping("/group2Filtered") - public String group2Filtered() { - return "group2Filtered"; - } - - @GetMapping("/group3Filtered") - public String group3Filtered() { - return "group3Filtered"; - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app185/Cat.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app185/Cat.java deleted file mode 100644 index eeff6f564..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app185/Cat.java +++ /dev/null @@ -1,24 +0,0 @@ -package test.org.springdoc.api.app185; - -import io.swagger.v3.oas.annotations.media.Schema; - -@Schema -public class Cat extends Pet { - - private final boolean meows; - - public Cat() { - super(); - this.meows = false; - } - - public Cat(boolean meows, String name) { - super(name); - this.meows = meows; - } - - public boolean getMeows() { - return meows; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app185/Dog.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app185/Dog.java deleted file mode 100644 index df8e9838f..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app185/Dog.java +++ /dev/null @@ -1,24 +0,0 @@ -package test.org.springdoc.api.app185; - -import io.swagger.v3.oas.annotations.media.Schema; - -@Schema -public class Dog extends Pet { - - private final boolean barks; - - public Dog() { - super(); - this.barks = false; - } - - public Dog(boolean barks, String name) { - super(name); - this.barks = barks; - } - - public boolean getBarks() { - return barks; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app185/Pet.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app185/Pet.java deleted file mode 100644 index fbd640315..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app185/Pet.java +++ /dev/null @@ -1,23 +0,0 @@ -package test.org.springdoc.api.app185; - -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type") -@JsonSubTypes({ - @JsonSubTypes.Type(Dog.class), - @JsonSubTypes.Type(Cat.class) -}) -public class Pet { - - public final String name; - - public Pet() { - this.name = null; - } - - public Pet(String name) { - this.name = name; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app185/PetController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app185/PetController.java deleted file mode 100644 index b69a4ed16..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app185/PetController.java +++ /dev/null @@ -1,18 +0,0 @@ -package test.org.springdoc.api.app185; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class PetController { - - @GetMapping("/any") - public Pet getAnyPet() { - return new Cat(true, "cat"); - } - - @GetMapping("/dog") - public Dog getDog() { - return new Dog(true, "dog"); - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app185/SpringDocApp185Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app185/SpringDocApp185Test.java deleted file mode 100644 index 63e94241e..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app185/SpringDocApp185Test.java +++ /dev/null @@ -1,12 +0,0 @@ -package test.org.springdoc.api.app185; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp185Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app19/SpringDocApp19Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app19/SpringDocApp19Test.java deleted file mode 100644 index 29eb576a5..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app19/SpringDocApp19Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app19; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp19Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/HomeController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/HomeController.java deleted file mode 100644 index 50f3d110e..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/HomeController.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app2.api; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; - -import static org.springdoc.core.Constants.SWAGGER_UI_PATH; -import static org.springframework.util.AntPathMatcher.DEFAULT_PATH_SEPARATOR; -import static org.springframework.web.servlet.view.UrlBasedViewResolver.REDIRECT_URL_PREFIX; - -/** - * Home redirection to swagger api documentation - */ -@Controller -public class HomeController { - - @Value(SWAGGER_UI_PATH) - private String swaggerUiPath; - - @GetMapping(DEFAULT_PATH_SEPARATOR) - public String index() { - return REDIRECT_URL_PREFIX + swaggerUiPath; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/PetApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/PetApiController.java deleted file mode 100644 index d42477dee..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/PetApiController.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app2.api; - -import java.util.Optional; - -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; - -@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") - -@Controller -@RequestMapping("${openapi.openAPIPetstore.base-path:/}") -public class PetApiController implements PetApi { - - private final PetApiDelegate delegate; - - public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() { - }); - } - - @Override - public PetApiDelegate getDelegate() { - return delegate; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/PetApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/PetApiDelegateImpl.java deleted file mode 100644 index da5f45a7a..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/PetApiDelegateImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app2.api; - -import org.springframework.stereotype.Service; - -@Service -public class PetApiDelegateImpl implements PetApiDelegate { - - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/StoreApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/StoreApiController.java deleted file mode 100644 index 95c3ed6fb..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/StoreApiController.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app2.api; - -import java.util.Optional; - -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; - -@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") - -@Controller -@RequestMapping("${openapi.openAPIPetstore.base-path:/}") -public class StoreApiController implements StoreApi { - - private final StoreApiDelegate delegate; - - public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() { - }); - } - - @Override - public StoreApiDelegate getDelegate() { - return delegate; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/StoreApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/StoreApiDelegateImpl.java deleted file mode 100644 index e3b865b0b..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/StoreApiDelegateImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app2.api; - -import org.springframework.stereotype.Service; - -@Service -public class StoreApiDelegateImpl implements StoreApiDelegate { - - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/UserApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/UserApiDelegateImpl.java deleted file mode 100644 index 4583ded42..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/UserApiDelegateImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app2.api; - -import org.springframework.stereotype.Service; - -@Service -public class UserApiDelegateImpl implements UserApiDelegate { - - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app20/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app20/HelloController.java deleted file mode 100644 index 60875312a..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app20/HelloController.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app20; - -import javax.validation.Valid; -import javax.validation.constraints.NotBlank; - -import io.swagger.v3.oas.annotations.Hidden; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping(value = "/persons") - @Hidden - public void persons(@Valid @NotBlank String name) { - - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app20/SpringDocApp20Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app20/SpringDocApp20Test.java deleted file mode 100644 index e81bd7ec0..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app20/SpringDocApp20Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app20; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp20Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app21/SpringDocApp21Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app21/SpringDocApp21Test.java deleted file mode 100644 index 67c937896..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app21/SpringDocApp21Test.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app21; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.test.context.TestPropertySource; - -@TestPropertySource(properties = "springdoc.oAuthFlow.authorizationUrl=http://personstore.swagger.io/oauth/dialog") -public class SpringDocApp21Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app22/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app22/HelloController.java deleted file mode 100644 index 1154ca363..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app22/HelloController.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app22; - -import java.util.List; - -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - - @GetMapping(value = "/persons") - public ResponseEntity>> doGet() { - return null; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app22/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app22/PersonDTO.java deleted file mode 100644 index 61eceaa8d..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app22/PersonDTO.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app22; - -public class PersonDTO { - private String email; - - private String firstName; - - private String lastName; - - public PersonDTO() { - } - - public PersonDTO(final String email, final String firstName, final String lastName) { - this.email = email; - this.firstName = firstName; - this.lastName = lastName; - } - - public String getEmail() { - return email; - } - - public void setEmail(final String email) { - this.email = email; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(final String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(final String lastName) { - this.lastName = lastName; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app22/SpringDocApp22Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app22/SpringDocApp22Test.java deleted file mode 100644 index 04159e4b5..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app22/SpringDocApp22Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app22; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp22Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app23/SpringDocApp23Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app23/SpringDocApp23Test.java deleted file mode 100644 index a87e0eca7..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app23/SpringDocApp23Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app23; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp23Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app24/SpringDocApp24Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app24/SpringDocApp24Test.java deleted file mode 100644 index 9cc6e671e..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app24/SpringDocApp24Test.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app24; - -import test.org.springdoc.api.AbstractSpringDocTest; - -public class SpringDocApp24Test extends AbstractSpringDocTest { - - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app25/SpringDocApp25Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app25/SpringDocApp25Test.java deleted file mode 100644 index 994fc19ec..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app25/SpringDocApp25Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app25; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp25Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app26/Bar.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app26/Bar.java deleted file mode 100644 index c76d4bdf2..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app26/Bar.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app26; - -public class Bar { - private String bar; - - public String getBar() { - return bar; - } - - public void setBar(String bar) { - this.bar = bar; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app26/Foo.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app26/Foo.java deleted file mode 100644 index 2e7ecec62..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app26/Foo.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app26; - -public class Foo { - - private String foo; - - public String getFoo() { - return foo; - } - - public void setFoo(String foo) { - this.foo = foo; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app26/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app26/HelloController.java deleted file mode 100644 index 2d768cac4..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app26/HelloController.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app26; - -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @PostMapping(value = "/persons") - public MyModel persons(MyModel myModel) { - return new MyModel(); - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app26/MyModel.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app26/MyModel.java deleted file mode 100644 index af669de69..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app26/MyModel.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app26; - -import io.swagger.v3.oas.annotations.media.Schema; - -public class MyModel { - - @Schema(description = "Hello", type = "object", oneOf = { Foo.class, Bar.class }) - private Object thing; - - public Object getThing() { - return thing; - } - - public void setThing(Object thing) { - this.thing = thing; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app26/SpringDocApp26Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app26/SpringDocApp26Test.java deleted file mode 100644 index bdbe6272b..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app26/SpringDocApp26Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app26; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp26Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/Bar.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/Bar.java deleted file mode 100644 index 2d0b32a97..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/Bar.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app27; - -public class Bar { - public String bar = "bar"; -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/Foo.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/Foo.java deleted file mode 100644 index 2bbdf99ab..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/Foo.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app27; - -public class Foo { - public String foo = "foo"; -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/HelloController.java deleted file mode 100644 index 600d66c95..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/HelloController.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app27; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - private boolean flag = false; - - @RequestMapping("/") - public String index() { - return ""; - } - - @GetMapping("/test") - public String test() { - flag = !flag; - throw flag ? new MyException() : new RuntimeException(); - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/MyException.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/MyException.java deleted file mode 100644 index 02553ba2e..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/MyException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app27; - -public class MyException extends RuntimeException { - - /** - * - */ - private static final long serialVersionUID = 1L; - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app28/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app28/HelloController.java deleted file mode 100644 index 79be6d40d..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app28/HelloController.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app28; - -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.multipart.MultipartFile; - -@RestController -public class HelloController { - - @PostMapping(value = "/upload2", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) - public String upload2(@RequestPart("one") MultipartFile one, @RequestPart("two") MultipartFile two) { - return "Ok"; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app28/SpringDocApp28Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app28/SpringDocApp28Test.java deleted file mode 100644 index b6c7d7786..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app28/SpringDocApp28Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app28; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp28Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app29/SpringDocApp29Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app29/SpringDocApp29Test.java deleted file mode 100644 index d1ff8f562..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app29/SpringDocApp29Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app29; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp29Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app29/TrackerData.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app29/TrackerData.java deleted file mode 100644 index d9e849926..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app29/TrackerData.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app29; - -import java.time.Instant; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; - -@Schema(name = "TrackerData") -public class TrackerData { - - @Schema(name = "trackerId", type = "string", required = true, example = "the-tracker-id") - @JsonProperty("trackerId") - String trackerId; - - @Schema(name = "timestamp", type = "string", format = "date-time", required = true, example = "2018-01-01T00:00:00Z") - @JsonProperty("timestamp") - Instant timestamp; - - @Schema(name = "value", type = "number", format = "double", description = "The data value", required = true, example = "19.0") - @JsonProperty("value") - Double value; - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app30/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app30/HelloController.java deleted file mode 100644 index f900e4605..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app30/HelloController.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app30; - -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping(produces = MediaType.TEXT_PLAIN_VALUE, path = "/test") - public String echo(@RequestParam(name = "text", defaultValue = "Hello, World!") String text) { - return text; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app30/SpringDocApp30Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app30/SpringDocApp30Test.java deleted file mode 100644 index c308acd49..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app30/SpringDocApp30Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app30; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp30Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app31/SpringDocApp31Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app31/SpringDocApp31Test.java deleted file mode 100644 index 319833b86..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app31/SpringDocApp31Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app31; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp31Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app32/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app32/HelloController.java deleted file mode 100644 index b987e1130..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app32/HelloController.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app32; - -import io.swagger.v3.oas.annotations.parameters.RequestBody; - -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @RequestMapping(value = "/filter", method = RequestMethod.POST) - @ResponseStatus(value = HttpStatus.OK) - public String filterPost(@RequestBody final MyTestDto filter) { - return "OK"; - } - - class MyTestDto { - public String object1; - - public String object2; - - public String object3; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app32/SpringDocApp32Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app32/SpringDocApp32Test.java deleted file mode 100644 index 0b5cb2e76..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app32/SpringDocApp32Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app32; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp32Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app33/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app33/HelloController.java deleted file mode 100644 index 1c62147ee..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app33/HelloController.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app33; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.responses.ApiResponse; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping(value = "/hello/{numTelco}") - @Operation(summary = "GET Persons", responses = @ApiResponse(responseCode = "418")) - public T index(@PathVariable("numTelco") String numTel, String adresse) { - return null; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app33/SpringDocApp33Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app33/SpringDocApp33Test.java deleted file mode 100644 index fd93c53be..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app33/SpringDocApp33Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app33; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp33Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app34/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app34/HelloController.java deleted file mode 100644 index 514eaca28..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app34/HelloController.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app34; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.responses.ApiResponse; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping(value = "/hello/{numTelco}") - @Operation(summary = "GET Persons", responses = @ApiResponse(responseCode = "418")) - public T index(@PathVariable("numTelco") String numTel, String adresse) { - return null; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app34/SpringDocApp34Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app34/SpringDocApp34Test.java deleted file mode 100644 index bf1a971a0..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app34/SpringDocApp34Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app34; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp34Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app35/SpringDocApp35Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app35/SpringDocApp35Test.java deleted file mode 100644 index 54c00ba96..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app35/SpringDocApp35Test.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app35; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -import static org.springdoc.core.SpringDocUtils.getConfig; - -public class SpringDocApp35Test extends AbstractSpringDocTest { - - static { - getConfig().addRestControllers(HelloController.class); - } - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app36/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app36/HelloController.java deleted file mode 100644 index b383255fc..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app36/HelloController.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app36; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping("/persons") - public String persons() { - return "OK"; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/Bar.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/Bar.java deleted file mode 100644 index cd28e480a..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/Bar.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app37; - -public class Bar { - public String bar = "bar"; -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/Car.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/Car.java deleted file mode 100644 index e89a0aed6..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/Car.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app37; - -public class Car { - public String car = "car"; - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/Foo.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/Foo.java deleted file mode 100644 index 926e3ced9..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/Foo.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app37; - -public class Foo { - public String foo = "foo"; -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/Pet.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/Pet.java deleted file mode 100644 index 6e0d12d84..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/Pet.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app37; - -public class Pet { - public String pet = "pet"; - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/SpringDocApp37Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/SpringDocApp37Test.java deleted file mode 100644 index 021eb3e90..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/SpringDocApp37Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app37; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp37Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app38/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app38/HelloController.java deleted file mode 100644 index f94570b92..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app38/HelloController.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app38; - -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; - -@RestController("/api") -public class HelloController { - - @RequestMapping(value = "/npe_error", method = RequestMethod.GET) - public ResponseEntity getModelResource() { - return new ResponseEntity<>(new byte[0], HttpStatus.OK); - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app38/SpringDocApp38Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app38/SpringDocApp38Test.java deleted file mode 100644 index 32760f76f..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app38/SpringDocApp38Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app38; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp38Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app39/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app39/HelloController.java deleted file mode 100644 index 70ba942f5..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app39/HelloController.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app39; - -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.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @Operation(summary = "test Request") - @RequestBody(description = "test value", required = true, content = @Content(schema = @Schema(implementation = String.class))) - @PostMapping("/test") - public void searchEmployee(String test) { - } - - @GetMapping("/hello") - public String hello() { - return "hello"; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app39/SpringDocApp39Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app39/SpringDocApp39Test.java deleted file mode 100644 index 4c346c559..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app39/SpringDocApp39Test.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app39; - -import test.org.springdoc.api.AbstractSpringDocTest; - -public class SpringDocApp39Test extends AbstractSpringDocTest { - - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app4/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app4/HelloController.java deleted file mode 100644 index 8220a9a65..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app4/HelloController.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app4; - -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @PostMapping(value = "/values/data") - TrackerData list(TrackerData toto) { - return toto; - - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app4/SpringDocApp4Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app4/SpringDocApp4Test.java deleted file mode 100644 index 53ec8d6b1..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app4/SpringDocApp4Test.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app4; - -import io.swagger.v3.core.jackson.TypeNameResolver; -import org.junit.jupiter.api.AfterAll; -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.test.context.TestPropertySource; - -@TestPropertySource(properties = "springdoc.use-fqn=true") -public class SpringDocApp4Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - - @AfterAll - static void restore(){ - TypeNameResolver.std.setUseFqn(false); - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app4/TrackerData.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app4/TrackerData.java deleted file mode 100644 index ba52b70d0..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app4/TrackerData.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app4; - -import java.time.Instant; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; - -public class TrackerData { - - @Schema(name = "trackerId", type = "string", required = true, example = "the-tracker-id") - @JsonProperty("trackerId") - String trackerId; - - @Schema(name = "timestamp", type = "string", format = "date-time", required = true, example = "2018-01-01T00:00:00Z") - @JsonProperty("timestamp") - Instant timestamp; - - @Schema(name = "value", type = "number", format = "double", description = "The data value", required = true, example = "19.0") - @JsonProperty("value") - Double value; - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app40/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app40/HelloController.java deleted file mode 100644 index 06ff59b14..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app40/HelloController.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app40; - -import com.fasterxml.jackson.databind.node.ObjectNode; - -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; - -@RestController("/api") -public class HelloController { - - @RequestMapping(value = "/iae_error", method = RequestMethod.GET) - public ObjectNode getStartFormProperties() { - return null; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app40/SpringDocApp40Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app40/SpringDocApp40Test.java deleted file mode 100644 index 2a447d32a..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app40/SpringDocApp40Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app40; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp40Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app42/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app42/HelloController.java deleted file mode 100644 index a4f2412b1..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app42/HelloController.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app42; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RestController; - - -@RestController("/api") -public class HelloController { - - @GetMapping(value = "/tweets") - public void tweets(@PathVariable TweetId id) { - - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app42/SpringDocApp42Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app42/SpringDocApp42Test.java deleted file mode 100644 index 5124f1b3a..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app42/SpringDocApp42Test.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app42; - -import io.swagger.v3.oas.models.Components; -import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.media.StringSchema; -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.Bean; - -public class SpringDocApp42Test extends AbstractSpringDocTest { - - - @SpringBootApplication - static class SpringDocTestApp { - @Bean - public OpenAPI customOpenAPI() { - return new OpenAPI().components(new Components().addSchemas("TweetId", new StringSchema())); - } - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app42/TweetId.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app42/TweetId.java deleted file mode 100644 index 5c48a6648..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app42/TweetId.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app42; - -public class TweetId { - private final String value; - - public TweetId(String value) { - this.value = value; - } - - public String getValue() { - return value; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app43/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app43/HelloController.java deleted file mode 100644 index b053bb4aa..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app43/HelloController.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app43; - -import java.util.List; - -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.multipart.MultipartFile; - -@RestController -public class HelloController { - - @PostMapping(path = "/documents", consumes = "multipart/form-data") - public ResponseEntity uploadDocuments(@RequestPart("doc") List multipartFiles) { - return null; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app43/SpringDocApp43Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app43/SpringDocApp43Test.java deleted file mode 100644 index ba79089eb..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app43/SpringDocApp43Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app43; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp43Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app45/OpenApiConfig.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app45/OpenApiConfig.java deleted file mode 100644 index b720c1b51..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app45/OpenApiConfig.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app45; - -import io.swagger.v3.oas.annotations.OpenAPIDefinition; -import io.swagger.v3.oas.annotations.enums.SecuritySchemeType; -import io.swagger.v3.oas.annotations.info.Info; -import io.swagger.v3.oas.annotations.info.License; -import io.swagger.v3.oas.annotations.security.SecurityScheme; - -@OpenAPIDefinition(info = @Info(title = "My App", description = "Some long and useful description", version = "v1", license = @License(name = "Apache 2.0", url = "https://www.apache.org/licenses/LICENSE-2.0"))) -@SecurityScheme(name = "bearer", type = SecuritySchemeType.HTTP, scheme = "bearer", bearerFormat = "JWT") -public class OpenApiConfig { -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app45/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app45/PersonDTO.java deleted file mode 100644 index d28eef918..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app45/PersonDTO.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app45; - -public class PersonDTO { - private String email; - - private String firstName; - - private String lastName; - - public PersonDTO() { - } - - public PersonDTO(final String email, final String firstName, final String lastName) { - this.email = email; - this.firstName = firstName; - this.lastName = lastName; - } - - public String getEmail() { - return email; - } - - public void setEmail(final String email) { - this.email = email; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(final String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(final String lastName) { - this.lastName = lastName; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app45/SpringDocApp45Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app45/SpringDocApp45Test.java deleted file mode 100644 index df0766642..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app45/SpringDocApp45Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app45; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp45Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app46/SpringDocApp46Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app46/SpringDocApp46Test.java deleted file mode 100644 index d7b1d9869..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app46/SpringDocApp46Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app46; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp46Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app47/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app47/HelloController.java deleted file mode 100644 index 7cca1e7a5..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app47/HelloController.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app47; - -import java.util.Locale; - -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.media.Schema; - -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - @GetMapping(path = "/documents/{locale}") - public ResponseEntity getDocumentsWithLocale( - @Parameter(schema = @Schema(type = "string")) @PathVariable("locale") Locale locale) { - return null; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app47/SpringDocApp47Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app47/SpringDocApp47Test.java deleted file mode 100644 index 8c01b72d6..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app47/SpringDocApp47Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app47; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp47Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app48/AbstractHelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app48/AbstractHelloController.java deleted file mode 100644 index 9d4c86206..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app48/AbstractHelloController.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app48; - -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.responses.ApiResponses; - -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.GetMapping; - -@ApiResponse(responseCode = "410") -@ApiResponses({ - @ApiResponse(responseCode = "411") -}) -public class AbstractHelloController { - - @GetMapping(path = "/documents/{locale}") - @ApiResponse(responseCode = "412") - @ApiResponses({ - @ApiResponse(responseCode = "413") - }) - public ResponseEntity getDocuments() { - return null; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app48/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app48/HelloController.java deleted file mode 100644 index 2bbf3d664..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app48/HelloController.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app48; - -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.responses.ApiResponses; - -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController - -@ApiResponse(responseCode = "400") -@ApiResponses({ - @ApiResponse(responseCode = "401") -}) -public class HelloController extends AbstractHelloController { - - @Override - @GetMapping(path = "/documents/{locale}") - @ApiResponse(responseCode = "402") - @ApiResponses({ - @ApiResponse(responseCode = "403") - }) - public ResponseEntity getDocuments() { - return null; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app48/SpringDocApp48Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app48/SpringDocApp48Test.java deleted file mode 100644 index 2165ee475..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app48/SpringDocApp48Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app48; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp48Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app49/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app49/HelloController.java deleted file mode 100644 index 080890eb0..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app49/HelloController.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app49; - -import java.util.List; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.responses.ApiResponses; - -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @Operation(description = "Obtain the list of services available in the system") - @ApiResponses({ @ApiResponse(responseCode = "401", ref = "Unauthorized") }) - @GetMapping(value = "/hello", produces = MediaType.APPLICATION_JSON_VALUE) - List list() { - return null; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app49/SpringDocApp49Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app49/SpringDocApp49Test.java deleted file mode 100644 index 6eeaf604a..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app49/SpringDocApp49Test.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app49; - -import test.org.springdoc.api.AbstractSpringDocTest; - -public class SpringDocApp49Test extends AbstractSpringDocTest { - - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app5/CustomOpenAPIConfig.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app5/CustomOpenAPIConfig.java deleted file mode 100644 index db1e512cf..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app5/CustomOpenAPIConfig.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app5; - -import io.swagger.v3.oas.models.Components; -import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.info.Info; -import io.swagger.v3.oas.models.tags.Tag; - -import org.springframework.context.annotation.Bean; - -public class CustomOpenAPIConfig { - @Bean - public OpenAPI customOpenAPI() { - return new OpenAPI() - .components(new Components()) - .info(new Info().title("Custom API").version("100")).addTagsItem(new Tag().name("mytag")); - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app50/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app50/HelloController.java deleted file mode 100644 index 9e711979a..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app50/HelloController.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app50; - -import java.util.List; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.responses.ApiResponse; - -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @Operation(description = "Some operation", responses = { @ApiResponse(responseCode = "401") }) - //@ApiResponse(responseCode = "401", content = @Content()) - @GetMapping(value = "/hello", produces = MediaType.APPLICATION_JSON_VALUE) - List list() { - return null; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app50/SpringDocApp50Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app50/SpringDocApp50Test.java deleted file mode 100644 index 2a2c2338a..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app50/SpringDocApp50Test.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app50; - -import test.org.springdoc.api.AbstractSpringDocTest; - -public class SpringDocApp50Test extends AbstractSpringDocTest { - - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app51/SpringDocApp51Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app51/SpringDocApp51Test.java deleted file mode 100644 index 71323e5d7..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app51/SpringDocApp51Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app51; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp51Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app52/SpringDocApp52Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app52/SpringDocApp52Test.java deleted file mode 100644 index 66402491e..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app52/SpringDocApp52Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app52; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp52Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app53/SpringDocApp53Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app53/SpringDocApp53Test.java deleted file mode 100644 index da703e3f1..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app53/SpringDocApp53Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app53; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp53Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app54/MealParty.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app54/MealParty.java deleted file mode 100644 index 4392f02f5..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app54/MealParty.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app54; - -import java.util.ArrayList; -import java.util.List; - -import com.fasterxml.jackson.annotation.JsonView; - -public class MealParty { - @JsonView(Views.Public.class) - private String name; - - @JsonView(Views.MealPartyAdmin.class) - private List members = new ArrayList<>(); -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app54/SpringDocApp54Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app54/SpringDocApp54Test.java deleted file mode 100644 index 0893de656..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app54/SpringDocApp54Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app54; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp54Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app54/Views.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app54/Views.java deleted file mode 100644 index 27aad5523..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app54/Views.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app54; - -public interface Views { - public interface Public { - } - - public interface MealPartyAdmin extends Public { - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app55/SpringDocApp55Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app55/SpringDocApp55Test.java deleted file mode 100644 index 169a1ff9d..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app55/SpringDocApp55Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app55; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp55Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app56/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app56/HelloController.java deleted file mode 100644 index fe86f46eb..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app56/HelloController.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app56; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping("/persons") - public String persons() { - return "OK"; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app56/SpringDocApp56Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app56/SpringDocApp56Test.java deleted file mode 100644 index c22be61a1..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app56/SpringDocApp56Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app56; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp56Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app57/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app57/HelloController.java deleted file mode 100644 index 7a9b13e8e..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app57/HelloController.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app57; - -import io.swagger.v3.oas.annotations.Parameter; - -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping("/{name:.+}") - public ResponseEntity getText(@Parameter(description = "desc", required = true) @PathVariable String name) { - return null; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app57/SpringDocApp57Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app57/SpringDocApp57Test.java deleted file mode 100644 index 54d1523e1..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app57/SpringDocApp57Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app57; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp57Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app58/SpringDocApp58Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app58/SpringDocApp58Test.java deleted file mode 100644 index 74946e55b..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app58/SpringDocApp58Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app58; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp58Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app59/HelloBody.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app59/HelloBody.java deleted file mode 100644 index d097d98fc..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app59/HelloBody.java +++ /dev/null @@ -1,14 +0,0 @@ -package test.org.springdoc.api.app59; - -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class HelloBody { - - @NotNull - @JsonProperty - private String helloValue; - - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app59/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app59/HelloController.java deleted file mode 100644 index fb3e6501c..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app59/HelloController.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app59; - -import io.swagger.v3.oas.annotations.responses.ApiResponse; - -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - @Deprecated - @GetMapping("/example") - public void test() { - } - - @PostMapping("/hello") - @ApiResponse(responseCode = "200", description = "The server accepted your hello.") - String hello(@Validated @RequestBody final HelloBody helloBody) { - return "World!"; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app59/HelloController2.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app59/HelloController2.java deleted file mode 100644 index dec88c772..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app59/HelloController2.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app59; - -import io.swagger.v3.oas.annotations.responses.ApiResponse; - -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@Deprecated -public class HelloController2 { - - @GetMapping("/example2") - public void test() { - } - - @PostMapping("/hello2") - @ApiResponse(responseCode = "200", description = "The server accepted your hello.") - String hello(@Validated @RequestBody final HelloBody helloBody) { - return "World!"; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app59/SpringDocApp59Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app59/SpringDocApp59Test.java deleted file mode 100644 index ac2fe428a..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app59/SpringDocApp59Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app59; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp59Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app6/SpringDocApp6Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app6/SpringDocApp6Test.java deleted file mode 100644 index 167bf89fd..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app6/SpringDocApp6Test.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app6; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp6Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app60/QueryPaging.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app60/QueryPaging.java deleted file mode 100644 index 207c2b55e..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app60/QueryPaging.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app60; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Parameters; - -@Retention(RetentionPolicy.RUNTIME) -@Target({ ElementType.METHOD }) -@Parameters({ - @Parameter(name = "page", description = "desc page from Annotated interface"), - @Parameter(name = "size", description = "desc page from Annotated interface") -}) -public @interface QueryPaging { -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app60/QuerySort.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app60/QuerySort.java deleted file mode 100644 index 81116278a..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app60/QuerySort.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app60; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import io.swagger.v3.oas.annotations.Parameter; - -@Retention(RetentionPolicy.RUNTIME) -@Target({ ElementType.METHOD }) -@Parameter(name = "sort", description = "desc sort from Annotated interface") -public @interface QuerySort { -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app60/SpringDocApp60Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app60/SpringDocApp60Test.java deleted file mode 100644 index 36c2f20f2..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app60/SpringDocApp60Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app60; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp60Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app61/SpringDocApp61Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app61/SpringDocApp61Test.java deleted file mode 100644 index 50f1aa219..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app61/SpringDocApp61Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app61; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp61Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app62/BaseController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app62/BaseController.java deleted file mode 100644 index 310d3f415..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app62/BaseController.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app62; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import org.springframework.core.annotation.AliasFor; -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@Target({ ElementType.METHOD, ElementType.TYPE }) -@Retention(RetentionPolicy.RUNTIME) -@RestController -@RequestMapping -public @interface BaseController { - @AliasFor(annotation = RequestMapping.class) - String[] value() default {}; - - @AliasFor(annotation = RequestMapping.class) - String[] produces() default { MediaType.APPLICATION_XML_VALUE, MediaType.APPLICATION_JSON_VALUE }; -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app62/SpringDocApp62Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app62/SpringDocApp62Test.java deleted file mode 100644 index 2424be32f..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app62/SpringDocApp62Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app62; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp62Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app62/TestController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app62/TestController.java deleted file mode 100644 index 7be487f4c..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app62/TestController.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app62; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; - -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; - -@BaseController -@Tag(name = "Test Controller") -public class TestController { - - @RequestMapping(value = "/test", method = RequestMethod.GET) - @Operation(summary = "This is the test endpoint") - public String test(@RequestHeader("Accept") String accept) { - return "This is a test"; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app63/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app63/HelloController.java deleted file mode 100644 index d5739a9eb..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app63/HelloController.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app63; - -import java.util.Locale; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping("/test") - public void test(HttpSession header, HttpServletRequest request, HttpServletResponse response, Locale locale, - String hello) { - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app63/SpringDocApp63Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app63/SpringDocApp63Test.java deleted file mode 100644 index 55a0c859d..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app63/SpringDocApp63Test.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app63; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.test.context.TestPropertySource; - - -@TestPropertySource(properties = { - "springdoc.packagesToScan=hell,hello1, hello.me", - "springdoc.packagesToExclude=test.org.springdoc.api.app63.65" }) -public class SpringDocApp63Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app64/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app64/HelloController.java deleted file mode 100644 index 0245f3a24..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app64/HelloController.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app64; - -import io.swagger.v3.oas.annotations.Operation; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping("/v1/test") - public void test1(String hello) { - } - - @GetMapping(value = "/api/balance/abcd") - @Operation(summary = "This is the test endpoint") - public String test2(String from) { - return "This is a fake test"; - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app64/SpringDocApp64Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app64/SpringDocApp64Test.java deleted file mode 100644 index 30f097272..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app64/SpringDocApp64Test.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app64; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.test.context.TestPropertySource; - -@TestPropertySource(properties = "springdoc.paths-to-match=/v1, /api/**") -public class SpringDocApp64Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app65/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app65/HelloController.java deleted file mode 100644 index 3896d2de0..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app65/HelloController.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app65; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; - -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@Tag(name = "Health", description = "Health check / ping API") -@RestController -public class HelloController { - - @Operation(summary = "Check server status", description = "Check server status, will return 200 with simple string if alive. Do nothing else.") - @GetMapping(value = { "/ping", "/health", "/" }, produces = MediaType.TEXT_PLAIN_VALUE) - public ResponseEntity ping() { - return ResponseEntity.ok("Healthy"); - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app65/SpringDocApp65Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app65/SpringDocApp65Test.java deleted file mode 100644 index 490fcec97..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app65/SpringDocApp65Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app65; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp65Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app66/DefaultHealthCheckApi.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app66/DefaultHealthCheckApi.java deleted file mode 100644 index 75e207879..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app66/DefaultHealthCheckApi.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app66; - -import java.time.LocalDate; - -import io.swagger.v3.oas.annotations.Hidden; - -import org.springframework.format.annotation.DateTimeFormat; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RestController; - - -@RestController -@Hidden -public class DefaultHealthCheckApi { - - @GetMapping("/test/date/echo/{date}") - public String testDateEcho(@DateTimeFormat(pattern = "yyyyMMdd") @PathVariable LocalDate date) { - return date.toString(); - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app66/SpringDocApp66Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app66/SpringDocApp66Test.java deleted file mode 100644 index 8e3c1efb4..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app66/SpringDocApp66Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app66; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp66Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app66/UndocumentedClass.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app66/UndocumentedClass.java deleted file mode 100644 index 9d22e6d85..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app66/UndocumentedClass.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app66; - -import io.swagger.v3.oas.annotations.Hidden; - -@Hidden -public class UndocumentedClass { - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app67/SpringDocApp67Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app67/SpringDocApp67Test.java deleted file mode 100644 index 95d8096eb..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app67/SpringDocApp67Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app67; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp67Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/CustomizedOperation.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/CustomizedOperation.java deleted file mode 100644 index 146b41c33..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/CustomizedOperation.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app68; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -@Retention(RetentionPolicy.RUNTIME) -public @interface CustomizedOperation { - String addition() default "customized operation!"; -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/HomeController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/HomeController.java deleted file mode 100644 index 2434d92a2..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/HomeController.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app68.api; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; - -import static org.springdoc.core.Constants.SWAGGER_UI_PATH; -import static org.springframework.util.AntPathMatcher.DEFAULT_PATH_SEPARATOR; -import static org.springframework.web.servlet.view.UrlBasedViewResolver.REDIRECT_URL_PREFIX; - -/** - * Home redirection to swagger api documentation - */ -@Controller -public class HomeController { - - @Value(SWAGGER_UI_PATH) - private String swaggerUiPath; - - @GetMapping(DEFAULT_PATH_SEPARATOR) - public String index() { - return REDIRECT_URL_PREFIX + swaggerUiPath; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/pet/PetApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/pet/PetApiController.java deleted file mode 100644 index 012fe00fe..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/pet/PetApiController.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app68.api.pet; - -import java.util.Optional; - -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") - -@RestController -@RequestMapping("${openapi.openAPIPetstore.base-path:/}") -public class PetApiController implements PetApi { - - private final PetApiDelegate delegate; - - public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() { - }); - } - - @Override - public PetApiDelegate getDelegate() { - return delegate; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/pet/PetApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/pet/PetApiDelegateImpl.java deleted file mode 100644 index 5a70c357f..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/pet/PetApiDelegateImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app68.api.pet; - -import org.springframework.stereotype.Service; - -@Service -public class PetApiDelegateImpl implements PetApiDelegate { - - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/store/StoreApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/store/StoreApiController.java deleted file mode 100644 index 95414794c..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/store/StoreApiController.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app68.api.store; - -import java.util.Optional; - -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") - -@RestController -@RequestMapping("${openapi.openAPIPetstore.base-path:/}") -public class StoreApiController implements StoreApi { - - private final StoreApiDelegate delegate; - - public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() { - }); - } - - @Override - public StoreApiDelegate getDelegate() { - return delegate; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/store/StoreApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/store/StoreApiDelegateImpl.java deleted file mode 100644 index 3e81c002b..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/store/StoreApiDelegateImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app68.api.store; - -import org.springframework.stereotype.Service; - -@Service -public class StoreApiDelegateImpl implements StoreApiDelegate { - - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/user/UserApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/user/UserApiController.java deleted file mode 100644 index 8ae1ecab2..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/user/UserApiController.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app68.api.user; - -import java.util.Optional; - -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") - -@RestController -@RequestMapping("${openapi.openAPIPetstore.base-path:/}") -public class UserApiController implements UserApi { - - private final UserApiDelegate delegate; - - public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() { - }); - } - - @Override - public UserApiDelegate getDelegate() { - return delegate; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/user/UserApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/user/UserApiDelegateImpl.java deleted file mode 100644 index dee9cd208..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/user/UserApiDelegateImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app68.api.user; - -import org.springframework.stereotype.Service; - -@Service -public class UserApiDelegateImpl implements UserApiDelegate { - - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/user/UserClient.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/user/UserClient.java deleted file mode 100644 index b4e42a00a..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/user/UserClient.java +++ /dev/null @@ -1,19 +0,0 @@ -package test.org.springdoc.api.app68.api.user; - -import test.org.springdoc.api.app68.model.User; - -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; - -@RequestMapping(value= "/users", consumes = "application/json") -@Controller -public class UserClient { - - @GetMapping("/{id}") - public User findById(@PathVariable Integer id) - { - return null; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app69/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app69/HelloController.java deleted file mode 100644 index 9a68d888e..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app69/HelloController.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app69; - -import java.util.concurrent.Callable; - -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @RequestMapping(value = "/tasks", method = RequestMethod.GET) - private Callable> getTasks(String str) { - return null; - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app69/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app69/PersonDTO.java deleted file mode 100644 index f8f29765d..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app69/PersonDTO.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app69; - -public class PersonDTO { - private String email; - - private String firstName; - - private String lastName; - - public PersonDTO() { - } - - public PersonDTO(final String email, final String firstName, final String lastName) { - this.email = email; - this.firstName = firstName; - this.lastName = lastName; - } - - public String getEmail() { - return email; - } - - public void setEmail(final String email) { - this.email = email; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(final String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(final String lastName) { - this.lastName = lastName; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app69/SpringDocApp69Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app69/SpringDocApp69Test.java deleted file mode 100644 index d36c637dc..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app69/SpringDocApp69Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app69; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp69Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app7/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app7/HelloController.java deleted file mode 100644 index 1cc629bf4..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app7/HelloController.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app7; - -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.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @Operation(summary = "test Request") - @RequestBody(description = "test value", required = true, content = @Content(schema = @Schema(implementation = String.class))) - @PostMapping("/test") - public void searchEmployee(String test) { - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app7/SpringDocApp7Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app7/SpringDocApp7Test.java deleted file mode 100644 index 77677b113..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app7/SpringDocApp7Test.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app7; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp7Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/HelloController.java deleted file mode 100644 index d6e35c924..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/HelloController.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app70; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import test.org.springdoc.api.app70.customizer.CustomizedOperation; -import test.org.springdoc.api.app70.customizer.CustomizedParameter; -import test.org.springdoc.api.app70.model.ApiType; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @CustomizedOperation - @Operation(description = "Some operation") - @GetMapping("/example/{test}") - public ApiType test(@PathVariable @CustomizedParameter @Parameter(description = "Parameter description") String test) { - return new ApiType(); - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/SpringDocApp70Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/SpringDocApp70Test.java deleted file mode 100644 index 9fe3f811c..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/SpringDocApp70Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app70; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp70Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/CustomizedOperation.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/CustomizedOperation.java deleted file mode 100644 index 476879d6b..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/CustomizedOperation.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app70.customizer; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -@Retention(RetentionPolicy.RUNTIME) -public @interface CustomizedOperation { - String addition() default "customized operation!"; -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/CustomizedParameter.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/CustomizedParameter.java deleted file mode 100644 index 111717fab..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/CustomizedParameter.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app70.customizer; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -@Retention(RetentionPolicy.RUNTIME) -public @interface CustomizedParameter { - String addition() default "customized parameter!"; -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/CustomizedProperty.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/CustomizedProperty.java deleted file mode 100644 index 0e82dbe8b..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/CustomizedProperty.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app70.customizer; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -@Retention(RetentionPolicy.RUNTIME) -public @interface CustomizedProperty { - String addition() default "customized property!"; -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/OperationCustomizer.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/OperationCustomizer.java deleted file mode 100644 index 385b0d814..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/OperationCustomizer.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app70.customizer; - -import io.swagger.v3.oas.models.Operation; - -import org.springframework.stereotype.Component; -import org.springframework.web.method.HandlerMethod; - -@Component -public class OperationCustomizer implements org.springdoc.core.customizers.OperationCustomizer { - @Override - public Operation customize(Operation operation, HandlerMethod handlerMethod) { - CustomizedOperation annotation = handlerMethod.getMethodAnnotation(CustomizedOperation.class); - if (annotation != null) { - operation.description(operation.getDescription() + ", " + annotation.addition()); - } - return operation; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/ParameterCustomizer.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/ParameterCustomizer.java deleted file mode 100644 index d0eeb5bc3..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/ParameterCustomizer.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app70.customizer; - -import io.swagger.v3.oas.models.parameters.Parameter; - -import org.springframework.core.MethodParameter; -import org.springframework.stereotype.Component; - -@Component -public class ParameterCustomizer implements org.springdoc.core.customizers.ParameterCustomizer { - @Override - public Parameter customize(Parameter parameterModel, MethodParameter methodParameter) { - CustomizedParameter annotation = methodParameter.getParameterAnnotation(CustomizedParameter.class); - if (annotation != null) { - parameterModel.description(parameterModel.getDescription() + ", " + annotation.addition()); - } - return parameterModel; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/model/ApiType.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/model/ApiType.java deleted file mode 100644 index 3697ecf80..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/model/ApiType.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app70.model; - -import java.time.Duration; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; -import test.org.springdoc.api.app70.customizer.CustomizedProperty; - -public class ApiType { - @CustomizedProperty - @Schema(description = "Test description") - @JsonProperty("someProperty") - private Duration someProperty; - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app71/Dog.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app71/Dog.java deleted file mode 100644 index e2a1f8854..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app71/Dog.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app71; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; - - -@Schema(name = "Dog") -public class Dog { - - @JsonProperty("display_name") - @Schema( - name = "display_name", - description = "A name given to the Dog", - example = "Fido" - ) - String displayName; - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app71/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app71/HelloController.java deleted file mode 100644 index aac8e6111..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app71/HelloController.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app71; - -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @PostMapping("/persons") - public String persons(Dog dog) { - return null; - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app71/SpringDocApp71Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app71/SpringDocApp71Test.java deleted file mode 100644 index 8c23a3cc1..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app71/SpringDocApp71Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app71; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp71Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app73/SpringDocApp73Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app73/SpringDocApp73Test.java deleted file mode 100644 index 27150181c..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app73/SpringDocApp73Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app73; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp73Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app74/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app74/HelloController.java deleted file mode 100644 index f09f085b6..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app74/HelloController.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app74; - -import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.ExampleObject; -import io.swagger.v3.oas.annotations.parameters.RequestBody; - -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RestController; - - -@RestController -public class HelloController { - - @PostMapping("/test") - @RequestBody( - content = @Content( - examples = @ExampleObject( - value = "sample" - ) - ) - ) - public String postMyRequestBody( - String myRequestBody) { - return null; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app74/SpringDocApp74Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app74/SpringDocApp74Test.java deleted file mode 100644 index 64da60a8d..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app74/SpringDocApp74Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app74; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp74Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app75/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app75/PersonDTO.java deleted file mode 100644 index 168e38c78..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app75/PersonDTO.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app75; - -public class PersonDTO { - private String email; - - private String firstName; - - private String lastName; - - public PersonDTO() { - } - - public PersonDTO(final String email, final String firstName, final String lastName) { - this.email = email; - this.firstName = firstName; - this.lastName = lastName; - } - - public String getEmail() { - return email; - } - - public void setEmail(final String email) { - this.email = email; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(final String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(final String lastName) { - this.lastName = lastName; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app75/RestResponseEntityExceptionHandler.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app75/RestResponseEntityExceptionHandler.java deleted file mode 100644 index a31630859..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app75/RestResponseEntityExceptionHandler.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app75; - -import java.util.List; - -import javax.servlet.http.HttpServletRequest; - -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.ControllerAdvice; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler; - -@ControllerAdvice -public class RestResponseEntityExceptionHandler - extends ResponseEntityExceptionHandler { - @ResponseStatus(value = HttpStatus.OK) - @ExceptionHandler({ Exception.class }) - public ResponseEntity> badRequest(HttpServletRequest req, Exception exception) { - return null; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app75/SpringDocApp75Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app75/SpringDocApp75Test.java deleted file mode 100644 index 30342d873..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app75/SpringDocApp75Test.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app75; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp75Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp { - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app76/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app76/HelloController.java deleted file mode 100644 index 04eccaea4..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app76/HelloController.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app76; - -import io.swagger.v3.oas.annotations.security.SecurityRequirements; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.RestController; - - -@RestController -public class HelloController { - - @GetMapping("/secure") - @ResponseBody - public String secured() { - return "It works!"; - } - - @GetMapping("/open") - @ResponseBody - @SecurityRequirements - public String open() { - return "It works!"; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app76/SpringDocApp76Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app76/SpringDocApp76Test.java deleted file mode 100644 index 2a8412752..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app76/SpringDocApp76Test.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app76; - -import java.util.Arrays; - -import io.swagger.v3.oas.models.Components; -import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.security.SecurityRequirement; -import io.swagger.v3.oas.models.security.SecurityScheme; -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.Bean; - -public class SpringDocApp76Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp { - @Bean - public OpenAPI openAPI() { - return new OpenAPI() - .components(new Components().addSecuritySchemes("bearer-jwt", - new SecurityScheme() - .type(SecurityScheme.Type.HTTP) - .scheme("bearer") - .bearerFormat("JWT")) - ) - .addSecurityItem( - new SecurityRequirement().addList("bearer-jwt", Arrays.asList("read", "write"))); - } - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app77/SpringDocApp77Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app77/SpringDocApp77Test.java deleted file mode 100644 index e9c2b11f5..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app77/SpringDocApp77Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app77; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp77Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app78/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app78/HelloController.java deleted file mode 100644 index b20ce5899..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app78/HelloController.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app78; - -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionStage; - -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @RequestMapping(value = "/person1", method = RequestMethod.GET) - private CompletionStage> getPerson1(String str) { - return null; - } - - @RequestMapping(value = "/person2", method = RequestMethod.GET) - private CompletableFuture getPerson2(String str) { - return null; - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app78/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app78/PersonDTO.java deleted file mode 100644 index 55d0ade1f..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app78/PersonDTO.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app78; - -public class PersonDTO { - private String email; - - private String firstName; - - private String lastName; - - public PersonDTO() { - } - - public PersonDTO(final String email, final String firstName, final String lastName) { - this.email = email; - this.firstName = firstName; - this.lastName = lastName; - } - - public String getEmail() { - return email; - } - - public void setEmail(final String email) { - this.email = email; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(final String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(final String lastName) { - this.lastName = lastName; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app78/SpringDocApp78Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app78/SpringDocApp78Test.java deleted file mode 100644 index fd6ecef0c..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app78/SpringDocApp78Test.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app78; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp78Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app79/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app79/HelloController.java deleted file mode 100644 index 49403b1ea..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app79/HelloController.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app79; - -import java.util.Optional; - -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping(produces = MediaType.TEXT_PLAIN_VALUE, path = "/test") - public String echo(@RequestParam Optional text) { - return text.orElse("not-specified"); - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app79/SpringDocApp79Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app79/SpringDocApp79Test.java deleted file mode 100644 index 94e11f386..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app79/SpringDocApp79Test.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app79; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - - -public class SpringDocApp79Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app8/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app8/HelloController.java deleted file mode 100644 index dd71b6d8c..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app8/HelloController.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app8; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping("/test") - public void test(String hello) { - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app8/SpringDocApp8Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app8/SpringDocApp8Test.java deleted file mode 100644 index c306b1f55..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app8/SpringDocApp8Test.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app8; - -import org.junit.jupiter.api.Test; -import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - - -public class SpringDocApp8Test extends AbstractSpringDocTest { - - @Test - public void testApp() throws Exception { - mockMvc.perform(get("/myapp" + Constants.DEFAULT_API_DOCS_URL).contextPath("/myapp")) - .andExpect(status().isOk()); - } - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app80/SpringDocApp80Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app80/SpringDocApp80Test.java deleted file mode 100644 index 19a5a7d6c..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app80/SpringDocApp80Test.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app80; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.test.context.ActiveProfiles; - -@ActiveProfiles("80") -public class SpringDocApp80Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app80/TestObject.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app80/TestObject.java deleted file mode 100644 index 13d00c968..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app80/TestObject.java +++ /dev/null @@ -1,25 +0,0 @@ -package test.org.springdoc.api.app80; - -import java.time.LocalDateTime; - -public class TestObject { - public String stringValue; - - public LocalDateTime localDateTime; - - public String getStringValue() { - return stringValue; - } - - public void setStringValue(String stringValue) { - this.stringValue = stringValue; - } - - public LocalDateTime getLocalDateTime() { - return localDateTime; - } - - public void setLocalDateTime(LocalDateTime localDateTime) { - this.localDateTime = localDateTime; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app81/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app81/HelloController.java deleted file mode 100644 index 7163bb300..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app81/HelloController.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app81; - -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("/api") -public class HelloController { - - @RequestMapping - public String test() { - return "ok"; - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app82/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app82/HelloController.java deleted file mode 100644 index 44be61824..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app82/HelloController.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app82; - -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - - @PutMapping(value = "/test") - public ResponseEntity put( - String configuration, - String second, PersonDTO personDTO) { - return null; - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app82/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app82/PersonDTO.java deleted file mode 100644 index d409f8a67..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app82/PersonDTO.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app82; - -public class PersonDTO { - private String email; - - private String firstName; - - private String lastName; - - public PersonDTO() { - } - - public PersonDTO(final String email, final String firstName, final String lastName) { - this.email = email; - this.firstName = firstName; - this.lastName = lastName; - } - - public String getEmail() { - return email; - } - - public void setEmail(final String email) { - this.email = email; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(final String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(final String lastName) { - this.lastName = lastName; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app82/SpringDocApp82Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app82/SpringDocApp82Test.java deleted file mode 100644 index 70553b630..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app82/SpringDocApp82Test.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app82; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp82Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app83/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app83/PersonDTO.java deleted file mode 100644 index 0a0dce5a7..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app83/PersonDTO.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app83; - -public class PersonDTO { - private String email; - - private String firstName; - - private String lastName; - - public PersonDTO() { - } - - public PersonDTO(final String email, final String firstName, final String lastName) { - this.email = email; - this.firstName = firstName; - this.lastName = lastName; - } - - public String getEmail() { - return email; - } - - public void setEmail(final String email) { - this.email = email; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(final String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(final String lastName) { - this.lastName = lastName; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app83/SpringDocApp83Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app83/SpringDocApp83Test.java deleted file mode 100644 index 3f275a3d4..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app83/SpringDocApp83Test.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app83; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp83Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app84/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app84/HelloController.java deleted file mode 100644 index d846e321d..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app84/HelloController.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app84; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("/api") -public class HelloController { - - @GetMapping("/persons") - public String persons() { - return "OK"; - } - - @GetMapping("/persons1") - public String persons(String toto) { - return "OK"; - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app84/SpringDocApp84Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app84/SpringDocApp84Test.java deleted file mode 100644 index 1c47af232..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app84/SpringDocApp84Test.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app84; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp84Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app85/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app85/HelloController.java deleted file mode 100644 index 69ecf82f6..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app85/HelloController.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app85; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; - -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("/api") -public class HelloController { - - @PostMapping("/test/{id}") - @Operation( - parameters = { - @Parameter(ref = "#/components/parameters/paramA"), - @Parameter(ref = "#/components/parameters/paramB") - } - ) - public void testme(@PathVariable("id") String id) { - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app85/SpringDocApp85Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app85/SpringDocApp85Test.java deleted file mode 100644 index 5a5650a31..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app85/SpringDocApp85Test.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app85; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp85Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app86/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app86/HelloController.java deleted file mode 100644 index 8742e4087..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app86/HelloController.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app86; - -import java.util.Locale; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping("/test") - public void test(HttpSession header, HttpServletRequest request, HttpServletResponse response, Locale locale, - String hello) { - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app86/SpringDocApp86Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app86/SpringDocApp86Test.java deleted file mode 100644 index 01b50d563..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app86/SpringDocApp86Test.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app86; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.test.context.TestPropertySource; - -@TestPropertySource(properties = { - "springdoc.packagesToScan=test.org.springdoc.api.app86", - "springdoc.packagesToExclude=test.org.springdoc.api.app86.test" }) -public class SpringDocApp86Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app86/test/HelloController2.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app86/test/HelloController2.java deleted file mode 100644 index 446777769..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app86/test/HelloController2.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app86.test; - -import java.util.Locale; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController2 { - - @GetMapping("/test2") - public void test(HttpSession header, HttpServletRequest request, HttpServletResponse response, Locale locale, - String hello) { - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app87/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app87/HelloController.java deleted file mode 100644 index 4aba70ce3..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app87/HelloController.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app87; - -import java.util.UUID; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.parameters.RequestBody; - -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.CookieValue; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RestController; - - -@RestController("cookie") -public class HelloController { - - @PutMapping("/{itemId}") - @Operation - public ResponseEntity putItem( - @CookieValue( - name = "cookie" - ) String cookie, - @PathVariable UUID itemId, - @RequestBody Item item - ) { - return ResponseEntity.ok(item); - } - - public static class Item { - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app87/SpringDocApp87Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app87/SpringDocApp87Test.java deleted file mode 100644 index 9bff5e33b..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app87/SpringDocApp87Test.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app87; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp87Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app88/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app88/HelloController.java deleted file mode 100644 index aef78aa12..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app88/HelloController.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app88; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping(value = "/persons") - public String persons() { - return null; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app88/SpringDocApp88Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app88/SpringDocApp88Test.java deleted file mode 100644 index 3283d1668..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app88/SpringDocApp88Test.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app88; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.test.context.TestPropertySource; - -@TestPropertySource(properties = "springdoc.auto-tag-classes=false") -public class SpringDocApp88Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app89/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app89/HelloController.java deleted file mode 100644 index 9750e9a6b..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app89/HelloController.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app89; - -import io.swagger.v3.oas.annotations.Operation; - -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.servlet.ModelAndView; - -@RestController -public class HelloController { - - @Operation(summary = "Get Status") - @GetMapping(value = "/status", produces = MediaType.TEXT_HTML_VALUE) - public ModelAndView getAddress(@PathVariable String id) { - return null; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app89/SpringDocApp89Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app89/SpringDocApp89Test.java deleted file mode 100644 index 0b6bffc0c..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app89/SpringDocApp89Test.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app89; - - -import io.swagger.v3.oas.models.media.ObjectSchema; -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.test.context.TestPropertySource; -import org.springframework.web.servlet.ModelAndView; - -import static org.springdoc.core.SpringDocUtils.getConfig; - -@TestPropertySource(properties = "springdoc.model-and-view-allowed=true") -public class SpringDocApp89Test extends AbstractSpringDocTest { - - static { - getConfig().replaceWithSchema(ModelAndView.class, new ObjectSchema()); - } - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app9/MyApi.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app9/MyApi.java deleted file mode 100644 index 2a09aeaa9..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app9/MyApi.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app9; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.enums.ParameterIn; - -import org.springframework.http.HttpHeaders; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; - -@RequestMapping("/myapi") -public interface MyApi { - - @Operation(description = "Annotations from interfaces test") - @GetMapping - String get( - @Parameter(hidden = true, in = ParameterIn.HEADER, name = HttpHeaders.ACCEPT_LANGUAGE) @RequestHeader(value = HttpHeaders.ACCEPT_LANGUAGE, required = false) String language); -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app9/MyApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app9/MyApiController.java deleted file mode 100644 index 0d1afa747..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app9/MyApiController.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app9; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class MyApiController implements MyApi { - public String get(String language) { - return language; - } - - - @Operation(description = "Annotations from class with hidden parameter code") - @GetMapping("/getCode") - public String getCode(@Parameter(hidden = true) String code) { - return code; - } -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java deleted file mode 100644 index 0eef04838..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app9/SpringDocApp9Test.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app9; - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp9Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app90/SpringDocApp90Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app90/SpringDocApp90Test.java deleted file mode 100644 index ef8a5193d..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app90/SpringDocApp90Test.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app90; - - -import test.org.springdoc.api.AbstractSpringDocTest; - -public class SpringDocApp90Test extends AbstractSpringDocTest { - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app91/Greeting.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app91/Greeting.java deleted file mode 100644 index 96cf47e1a..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app91/Greeting.java +++ /dev/null @@ -1,26 +0,0 @@ -package test.org.springdoc.api.app91; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.Schema; - -@Schema( - type = "object", - name = "Greeting", - title = "Greeting", - description = "An object containing a greeting message") -public class Greeting { - - - @Schema( - name = "payload", - description = "The greeting value", - type = "string", - nullable = false, - example = "sdfsdfs") - @JsonProperty("payload") - private String payload; - - public Greeting(String payload) { - this.payload = payload; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app91/SpringDocApp91Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app91/SpringDocApp91Test.java deleted file mode 100644 index f0da41540..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app91/SpringDocApp91Test.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app91; - - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.test.context.TestPropertySource; - -@TestPropertySource(properties = "springdoc.override-with-generic-response=false") -public class SpringDocApp91Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app92/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app92/HelloController.java deleted file mode 100644 index 160691f4f..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app92/HelloController.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app92; - -import javax.validation.constraints.NotNull; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("/test") -public class HelloController { - - @GetMapping - String index(@NotNull String test) { - return null; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app92/ParameterCustomizer.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app92/ParameterCustomizer.java deleted file mode 100644 index 91c56b6fd..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app92/ParameterCustomizer.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app92; - -import javax.validation.constraints.NotNull; - -import io.swagger.v3.oas.models.parameters.Parameter; - -import org.springframework.core.MethodParameter; -import org.springframework.stereotype.Component; - -@Component -public class ParameterCustomizer implements org.springdoc.core.customizers.ParameterCustomizer { - @Override - public Parameter customize(Parameter parameterModel, MethodParameter methodParameter) { - NotNull annotation = methodParameter.getParameterAnnotation(NotNull.class); - if (annotation != null) { - parameterModel.required(false); - } - return parameterModel; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app92/SpringDocApp92Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app92/SpringDocApp92Test.java deleted file mode 100644 index 9e6c1387c..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app92/SpringDocApp92Test.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app92; - - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp92Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app93/BaseClientModel.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app93/BaseClientModel.java deleted file mode 100644 index 77f3cee63..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app93/BaseClientModel.java +++ /dev/null @@ -1,8 +0,0 @@ -package test.org.springdoc.api.app93; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public abstract class BaseClientModel { - @JsonProperty("id") - int id; -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app93/BaseController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app93/BaseController.java deleted file mode 100644 index 26df7ab76..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app93/BaseController.java +++ /dev/null @@ -1,13 +0,0 @@ -package test.org.springdoc.api.app93; - -import io.swagger.v3.oas.annotations.Operation; - -import org.springframework.web.bind.annotation.GetMapping; - -public abstract class BaseController { - @Operation - @GetMapping - TClientModel get(TClientModel param) { - return null; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app93/SpecificClientModel.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app93/SpecificClientModel.java deleted file mode 100644 index c7488284c..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app93/SpecificClientModel.java +++ /dev/null @@ -1,8 +0,0 @@ -package test.org.springdoc.api.app93; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class SpecificClientModel extends BaseClientModel { - @JsonProperty("name") - String name; -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app93/SpecificController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app93/SpecificController.java deleted file mode 100644 index 078ffff9d..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app93/SpecificController.java +++ /dev/null @@ -1,6 +0,0 @@ -package test.org.springdoc.api.app93; - -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class SpecificController extends BaseController {} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app93/SpringDocApp93Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app93/SpringDocApp93Test.java deleted file mode 100644 index f3a8d27f9..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app93/SpringDocApp93Test.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app93; - - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp93Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app95/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app95/HelloController.java deleted file mode 100644 index 8759a46a9..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app95/HelloController.java +++ /dev/null @@ -1,21 +0,0 @@ -package test.org.springdoc.api.app95; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("/persons") -public class HelloController { - - @GetMapping - @Operation(summary = "${test.app95.operation.persons.summary}", - description = "${test.app95.operation.persons.description}") - public void persons(@Parameter(description = "${test.app95.param.name.description}") String name) { - - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app95/SpringDocApp95Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app95/SpringDocApp95Test.java deleted file mode 100644 index 961897e88..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app95/SpringDocApp95Test.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app95; - - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.test.context.ActiveProfiles; - -@ActiveProfiles("95") -public class SpringDocApp95Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app96/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app96/HelloController.java deleted file mode 100644 index 66bb60f07..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app96/HelloController.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app96; - -import javax.validation.constraints.Min; -import javax.validation.constraints.NotNull; - -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - - @PostMapping("/api1") - String test1(@RequestBody @Min(2) int test) { - return null; - } - - @PostMapping("/api2") - String test2(@RequestBody String test) { - return null; - } - - @PostMapping("/api3") - String test3(@NotNull String test) { - return null; - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app96/SpringDocApp96Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app96/SpringDocApp96Test.java deleted file mode 100644 index ea7ced248..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app96/SpringDocApp96Test.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app96; - - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp96Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app97/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app97/HelloController.java deleted file mode 100644 index 009cac4ab..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app97/HelloController.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app97; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("/api") -public class HelloController { - - @GetMapping(value = "/student/header1", headers = "X-API-VERSION=1") - public StudentV1 headerV1() { - return new StudentV1("Bob Charlie"); - } - - @GetMapping(value = "/student/header2", headers = "X-API-VERSION=2") - public StudentV2 headerV2() { - return new StudentV2("Charlie"); - } - - @GetMapping(value = "/student/header3", headers = "X-API-VERSION") - public StudentV3 headerV3() { - return new StudentV3("Tom Charlie"); - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app97/SpringDocApp97Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app97/SpringDocApp97Test.java deleted file mode 100644 index babf1c8b0..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app97/SpringDocApp97Test.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app97; - - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp97Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app97/StudentV1.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app97/StudentV1.java deleted file mode 100644 index bd35bab14..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app97/StudentV1.java +++ /dev/null @@ -1,13 +0,0 @@ -package test.org.springdoc.api.app97; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class StudentV1 { - - @JsonProperty("name") - private String name; - - public StudentV1(String name) { - this.name = name; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app97/StudentV2.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app97/StudentV2.java deleted file mode 100644 index 665200fb7..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app97/StudentV2.java +++ /dev/null @@ -1,13 +0,0 @@ -package test.org.springdoc.api.app97; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class StudentV2 { - - @JsonProperty("name") - private String name; - - public StudentV2(String name) { - this.name = name; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app97/StudentV3.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app97/StudentV3.java deleted file mode 100644 index aa3fc0b21..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app97/StudentV3.java +++ /dev/null @@ -1,13 +0,0 @@ -package test.org.springdoc.api.app97; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class StudentV3 { - - @JsonProperty("name") - private String name; - - public StudentV3(String name) { - this.name = name; - } -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app98/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app98/HelloController.java deleted file mode 100644 index 9f98caefd..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app98/HelloController.java +++ /dev/null @@ -1,14 +0,0 @@ -package test.org.springdoc.api.app98; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HelloController { - - @GetMapping("/persons") - public void persons(@IgnoredAnnotationParameter String name) { - - } - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app98/IgnoredAnnotationParameter.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app98/IgnoredAnnotationParameter.java deleted file mode 100644 index 30d795a0d..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app98/IgnoredAnnotationParameter.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app98; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -@Retention(RetentionPolicy.RUNTIME) -public @interface IgnoredAnnotationParameter { - String addition() default "customized parameter!"; -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app98/SpringDocApp98Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app98/SpringDocApp98Test.java deleted file mode 100644 index 69915e623..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app98/SpringDocApp98Test.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app98; - - -import org.springdoc.core.SpringDocUtils; -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; - -public class SpringDocApp98Test extends AbstractSpringDocTest { - - static { - SpringDocUtils.getConfig().addAnnotationsToIgnore(IgnoredAnnotationParameter.class); - } - - @SpringBootApplication - static class SpringDocTestApp {} -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app99/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app99/HelloController.java deleted file mode 100644 index 3fbb9badc..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app99/HelloController.java +++ /dev/null @@ -1,22 +0,0 @@ -package test.org.springdoc.api.app99; - -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.responses.ApiResponses; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("/persons") -public class HelloController { - - @GetMapping - @ApiResponses({ - @ApiResponse(responseCode = "202", description = "${test.app99.operation.persons.response.202.description}") - }) - public void persons() { - - } - -} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app99/SpringDocApp99Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app99/SpringDocApp99Test.java deleted file mode 100644 index a853cb3da..000000000 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app99/SpringDocApp99Test.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at - * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * - */ - -package test.org.springdoc.api.app99; - - -import test.org.springdoc.api.AbstractSpringDocTest; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.test.context.ActiveProfiles; - -@ActiveProfiles("99") -public class SpringDocApp99Test extends AbstractSpringDocTest { - - @SpringBootApplication - static class SpringDocTestApp {} - -} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/AbstractSpringDocActuatorV30Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/AbstractSpringDocActuatorV30Test.java new file mode 100644 index 000000000..debb82880 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/AbstractSpringDocActuatorV30Test.java @@ -0,0 +1,51 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30; + +import javax.annotation.PostConstruct; + +import test.org.springdoc.api.AbstractCommonTest; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.actuate.autoconfigure.web.server.LocalManagementPort; +import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.test.context.TestPropertySource; +import org.springframework.web.client.RestTemplate; + +@TestPropertySource(properties={ "management.endpoints.enabled-by-default=true" }) +public abstract class AbstractSpringDocActuatorV30Test extends AbstractCommonTest { + + @LocalManagementPort + private int managementPort; + + @Autowired + private RestTemplateBuilder restTemplateBuilder; + + protected RestTemplate actuatorRestTemplate; + + @PostConstruct + void init() { + actuatorRestTemplate = restTemplateBuilder + .rootUri("http://localhost:" + this.managementPort).build(); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/AbstractSpringDocV30Test.java similarity index 52% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/AbstractSpringDocV30Test.java index 373ebf4c0..b69d179e4 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/AbstractSpringDocTest.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/AbstractSpringDocV30Test.java @@ -1,25 +1,30 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api; +package test.org.springdoc.api.v30; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; +import test.org.springdoc.api.AbstractCommonTest; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.web.servlet.MvcResult; @@ -31,7 +36,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @SpringBootTest -public abstract class AbstractSpringDocTest extends AbstractCommonTest { +public abstract class AbstractSpringDocV30Test extends AbstractCommonTest { public static String className; @@ -42,7 +47,7 @@ public void testApp() throws Exception { MvcResult mockMvcResult = mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))).andReturn(); String result = mockMvcResult.getResponse().getContentAsString(); - String expected = getContent("results/app" + testNumber + ".json"); + String expected = getContent("results/3.0.1/app" + testNumber + ".json"); assertEquals(expected, result, true); } } diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ApiException.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ApiException.java new file mode 100644 index 000000000..0717008db --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ApiException.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app1; + +public final class ApiException extends Exception { + + private static final long serialVersionUID = 1L; + + @SuppressWarnings("unused") + + private final int code; + + public ApiException(int code, String msg) { + super(msg); + this.code = code; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ApiOriginFilter.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ApiOriginFilter.java similarity index 56% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ApiOriginFilter.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ApiOriginFilter.java index 8cf4e60c3..37b0fc288 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ApiOriginFilter.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ApiOriginFilter.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app1; +package test.org.springdoc.api.v30.app1; import java.io.IOException; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ApiResponseMessage.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ApiResponseMessage.java similarity index 62% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ApiResponseMessage.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ApiResponseMessage.java index 9683c3dec..ef218b89c 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ApiResponseMessage.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ApiResponseMessage.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app1; +package test.org.springdoc.api.v30.app1; import javax.xml.bind.annotation.XmlTransient; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ErrorMessage.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ErrorMessage.java new file mode 100644 index 000000000..4ad53cfcb --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ErrorMessage.java @@ -0,0 +1,52 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app1; + +public class ErrorMessage { + + private String id; + + private String message; + + public ErrorMessage(String id, String message2) { + this.id = id; + this.message = message2; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ExceptionTranslator.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ExceptionTranslator.java similarity index 55% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ExceptionTranslator.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ExceptionTranslator.java index 7055ade87..f1275f326 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ExceptionTranslator.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ExceptionTranslator.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app1; +package test.org.springdoc.api.v30.app1; import java.util.UUID; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/HelloController.java new file mode 100644 index 000000000..24020456e --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/HelloController.java @@ -0,0 +1,44 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app1; + + +import io.swagger.v3.oas.annotations.tags.Tag; + +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping(value = "/hello/{numTelco}") + @ResponseStatus(HttpStatus.I_AM_A_TEAPOT) + @Tag(name = "${prop.toto}") + public String index(@PathVariable("numTelco") String numTel, String adresse) { + return "Greetings from Spring Boot!"; + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/HomeController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/HomeController.java new file mode 100644 index 000000000..a1fe8d45f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/HomeController.java @@ -0,0 +1,46 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app1; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; + +import static org.springdoc.core.Constants.SWAGGER_UI_PATH; +import static org.springframework.util.AntPathMatcher.DEFAULT_PATH_SEPARATOR; +import static org.springframework.web.servlet.view.UrlBasedViewResolver.REDIRECT_URL_PREFIX; + +/** + * Home redirection to swagger api documentation + */ +@Controller +public class HomeController { + + @Value(SWAGGER_UI_PATH) + private String swaggerUiPath; + + @GetMapping(DEFAULT_PATH_SEPARATOR) + public String index() { + return REDIRECT_URL_PREFIX + swaggerUiPath; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/InventoryApi.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/InventoryApi.java similarity index 77% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/InventoryApi.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/InventoryApi.java index 386256b2a..869bc1b6a 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/InventoryApi.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/InventoryApi.java @@ -1,18 +1,22 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ @@ -21,7 +25,7 @@ * https://github.com/swagger-api/swagger-codegen * Do not edit the class manually. */ -package test.org.springdoc.api.app1; +package test.org.springdoc.api.v30.app1; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/InventoryApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/InventoryApiController.java similarity index 73% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/InventoryApiController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/InventoryApiController.java index 787699a3f..f00853045 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/InventoryApiController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/InventoryApiController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app1; +package test.org.springdoc.api.v30.app1; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/InventoryItem.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/InventoryItem.java similarity index 81% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/InventoryItem.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/InventoryItem.java index 2823d3929..16dd28c7c 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/InventoryItem.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/InventoryItem.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app1; +package test.org.springdoc.api.v30.app1; import java.util.Objects; import java.util.UUID; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ItemController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ItemController.java similarity index 71% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ItemController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ItemController.java index f0712b584..4850d997b 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ItemController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ItemController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app1; +package test.org.springdoc.api.v30.app1; import java.net.URI; import java.time.Instant; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ItemDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ItemDTO.java similarity index 68% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ItemDTO.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ItemDTO.java index ca1edcb72..9ce7c8e90 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ItemDTO.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ItemDTO.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app1; +package test.org.springdoc.api.v30.app1; import java.io.Serializable; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ItemLightDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ItemLightDTO.java similarity index 58% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ItemLightDTO.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ItemLightDTO.java index 2f48dca8e..72c5a1023 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/ItemLightDTO.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/ItemLightDTO.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app1; +package test.org.springdoc.api.v30.app1; import java.io.Serializable; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/Manufacturer.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/Manufacturer.java similarity index 77% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/Manufacturer.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/Manufacturer.java index 8210ddb5b..06b22733b 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/Manufacturer.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/Manufacturer.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app1; +package test.org.springdoc.api.v30.app1; import java.util.Objects; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/PeopleRestService.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/PeopleRestService.java similarity index 84% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/PeopleRestService.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/PeopleRestService.java index a2ac1d9cb..47fd1262d 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/PeopleRestService.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/PeopleRestService.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app1; +package test.org.springdoc.api.v30.app1; import java.net.URI; import java.util.Collection; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/PersonDTO.java new file mode 100644 index 000000000..05aba8806 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/PersonDTO.java @@ -0,0 +1,64 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app1; + +public class PersonDTO { + private String email; + + private String firstName; + + private String lastName; + + public PersonDTO() { + } + + public PersonDTO(final String email, final String firstName, final String lastName) { + this.email = email; + this.firstName = firstName; + this.lastName = lastName; + } + + public String getEmail() { + return email; + } + + public void setEmail(final String email) { + this.email = email; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(final String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(final String lastName) { + this.lastName = lastName; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/SpringDocApp1Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/SpringDocApp1Test.java similarity index 51% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/SpringDocApp1Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/SpringDocApp1Test.java index 0f35dbe1b..48ac36995 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app1/SpringDocApp1Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app1/SpringDocApp1Test.java @@ -1,36 +1,40 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app1; +package test.org.springdoc.api.v30.app1; import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.info.License; import io.swagger.v3.oas.models.security.SecurityScheme; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; import org.springframework.test.context.TestPropertySource; @TestPropertySource(properties = {"springdoc.default-produces-media-type=application/json", "prop.toto=tea"}) -public class SpringDocApp1Test extends AbstractSpringDocTest { +public class SpringDocApp1Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp { diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app10/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app10/HelloController.java similarity index 50% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app10/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app10/HelloController.java index 817f6333d..b249c77b0 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app10/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app10/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app10; +package test.org.springdoc.api.v30.app10; import java.nio.charset.Charset; import java.util.Locale; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app10/SpringDocApp10Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app10/SpringDocApp10Test.java new file mode 100644 index 000000000..b2a001dd5 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app10/SpringDocApp10Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app10; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp10Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app100/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app100/HelloController.java new file mode 100644 index 000000000..654e24ac1 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app100/HelloController.java @@ -0,0 +1,43 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app100; + +import javax.validation.constraints.NotNull; + +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.tags.Tags; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@Tags(value = @Tag(name = "hello-ap1")) +public class HelloController { + + @GetMapping(value = "/search", produces = { "application/xml", "application/json" }) + @Tags(value = @Tag(name = "hello-ap2")) + public PersonDTO getAllPets(@NotNull String toto) { + return null; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app100/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app100/PersonDTO.java new file mode 100644 index 000000000..1fd9b50f5 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app100/PersonDTO.java @@ -0,0 +1,67 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app100; + +import io.swagger.v3.oas.annotations.media.Schema; + +@Schema +public class PersonDTO { + private String email; + + private String firstName; + + private String lastName; + + public PersonDTO() { + } + + public PersonDTO(final String email, final String firstName, final String lastName) { + this.email = email; + this.firstName = firstName; + this.lastName = lastName; + } + + public String getEmail() { + return email; + } + + public void setEmail(final String email) { + this.email = email; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(final String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(final String lastName) { + this.lastName = lastName; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app100/SpringDocApp100Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app100/SpringDocApp100Test.java new file mode 100644 index 000000000..38164a42c --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app100/SpringDocApp100Test.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app100; + + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp100Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app101/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app101/HelloController.java new file mode 100644 index 000000000..279f722f9 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app101/HelloController.java @@ -0,0 +1,45 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app101; + +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.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/hello") +public class HelloController { + + @GetMapping + @ApiResponse(content = @Content(schema = @Schema( + description = "${test.app101.operation.hello.response.schema.description}", + implementation = HelloDTO.class))) + public HelloDTO hello() { + return new HelloDTO(); + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app101/HelloDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app101/HelloDTO.java new file mode 100644 index 000000000..1e9f1fc05 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app101/HelloDTO.java @@ -0,0 +1,43 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app101; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +@Schema(description = "${test.app101.schema.hello.description}") +public class HelloDTO { + + @Schema(description = "${test.app101.schema.hello.param.id.description}") + private String id; + + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app101/SpringDocApp101Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app101/SpringDocApp101Test.java new file mode 100644 index 000000000..17fb68a3f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app101/SpringDocApp101Test.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app101; + + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.ActiveProfiles; + +@ActiveProfiles("101") +public class SpringDocApp101Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app102/InheritedRequestParams.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app102/InheritedRequestParams.java new file mode 100644 index 000000000..3f316795c --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app102/InheritedRequestParams.java @@ -0,0 +1,41 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app102; + +import javax.validation.constraints.NotBlank; + +import io.swagger.v3.oas.annotations.Parameter; + +public class InheritedRequestParams extends RequestParams { + @Parameter(description = "parameter from child of RequestParams") + @NotBlank + private String childParam; + + public String getChildParam() { + return childParam; + } + + public void setChildParam(String childParam) { + this.childParam = childParam; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app102/RequestParams.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app102/RequestParams.java similarity index 73% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app102/RequestParams.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app102/RequestParams.java index 9814a8fcb..7ac58f856 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app102/RequestParams.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app102/RequestParams.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app102; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app102; import java.math.BigInteger; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app102/SpringDocApp102Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app102/SpringDocApp102Test.java new file mode 100644 index 000000000..9cd19f78a --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app102/SpringDocApp102Test.java @@ -0,0 +1,32 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app102; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp102Test extends AbstractSpringDocV30Test { + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app102/TestController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app102/TestController.java new file mode 100644 index 000000000..bcdf60e69 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app102/TestController.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app102; + +import org.springdoc.api.annotations.ParameterObject; + +import org.springframework.lang.Nullable; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class TestController { + @GetMapping("test") + public void getTest(@RequestParam @Nullable String param, @ParameterObject InheritedRequestParams requestParams) { + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app103/ExampleBody.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app103/ExampleBody.java new file mode 100644 index 000000000..af704e4cd --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app103/ExampleBody.java @@ -0,0 +1,45 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app103; + +public class ExampleBody { + private String stringParam; + + private int intParam; + + public String getStringParam() { + return stringParam; + } + + public void setStringParam(String stringParam) { + this.stringParam = stringParam; + } + + public int getIntParam() { + return intParam; + } + + public void setIntParam(int intParam) { + this.intParam = intParam; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app103/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app103/HelloController.java similarity index 56% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app103/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app103/HelloController.java index 7edca9279..49ca72686 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app103/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app103/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app103; +package test.org.springdoc.api.v30.app103; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app103/SpringDocApp103Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app103/SpringDocApp103Test.java new file mode 100644 index 000000000..4b863af1b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app103/SpringDocApp103Test.java @@ -0,0 +1,32 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app103; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp103Test extends AbstractSpringDocV30Test { + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app104/CrudController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app104/CrudController.java new file mode 100644 index 000000000..a13f8f5ce --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app104/CrudController.java @@ -0,0 +1,53 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app104; + +import java.util.List; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.ResponseBody; + +@Controller +@SuppressWarnings("rawtypes") +public abstract class CrudController { + + @GetMapping(path = "{id}") + @ResponseBody + @Operation(description = "Get single object") + public T get( // + @Parameter(description = "The id to get.", required = true) @PathVariable("id") int id) { + return null; + } + + @GetMapping(path = "") + @ResponseBody + @Operation(description = "Receive a list of objects") + public List list() { + return null; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app104/Design.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app104/Design.java new file mode 100644 index 000000000..990b140e9 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app104/Design.java @@ -0,0 +1,26 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app104; + +public class Design extends HavingPK { +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app104/DesignController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app104/DesignController.java new file mode 100644 index 000000000..3792dbe18 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app104/DesignController.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app104; + +import io.swagger.v3.oas.annotations.tags.Tag; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; + +@Tag(name = "design") +@Controller +@RequestMapping("/design") +public class DesignController extends CrudController { + + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app104/HavingPK.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app104/HavingPK.java new file mode 100644 index 000000000..915178c44 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app104/HavingPK.java @@ -0,0 +1,26 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app104; + +public class HavingPK { +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app104/SpringDocApp104Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app104/SpringDocApp104Test.java new file mode 100644 index 000000000..0d6aee7f6 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app104/SpringDocApp104Test.java @@ -0,0 +1,32 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app104; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp104Test extends AbstractSpringDocV30Test { + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/SpringDocApp105Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/SpringDocApp105Test.java similarity index 69% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/SpringDocApp105Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/SpringDocApp105Test.java index 6540f3750..138d5d34b 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/SpringDocApp105Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/SpringDocApp105Test.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app105; +package test.org.springdoc.api.v30.app105; import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.OpenAPI; @@ -25,7 +29,7 @@ import io.swagger.v3.oas.models.security.SecurityScheme; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; @@ -41,15 +45,15 @@ "springdoc.group-configs[0].group=stores", "springdoc.group-configs[0].paths-to-match=/store/**", "springdoc.group-configs[1].group=users", - "springdoc.group-configs[1].packages-to-scan=test.org.springdoc.api.app105.api.user", + "springdoc.group-configs[1].packages-to-scan=test.org.springdoc.api.v30.app105.api.user", "springdoc.group-configs[2].group=pets", "springdoc.group-configs[2].paths-to-match=/pet/**", "springdoc.group-configs[3].group=groups test", "springdoc.group-configs[3].paths-to-match=/v1/**", "springdoc.group-configs[3].paths-to-exclude=/v1/users", - "springdoc.group-configs[3].packages-to-scan=test.org.springdoc.api.app105.api.user,test.org.springdoc.api.app105.api.store", + "springdoc.group-configs[3].packages-to-scan=test.org.springdoc.api.v30.app105.api.user,test.org.springdoc.api.v30.app105.api.store", }) -public class SpringDocApp105Test extends AbstractSpringDocTest { +public class SpringDocApp105Test extends AbstractSpringDocV30Test { public static String className; @@ -58,7 +62,7 @@ public void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/stores")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app105-1.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app105-1.json"), true)); } @Test @@ -66,7 +70,7 @@ public void testApp2() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/users")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app105-2.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app105-2.json"), true)); } @Test @@ -74,7 +78,7 @@ public void testApp3() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/pets")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app105-3.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app105-3.json"), true)); } @Test @@ -82,7 +86,7 @@ public void testApp4() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/groups test")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app105-4.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app105-4.json"), true)); } diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/ApiUtil.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/ApiUtil.java new file mode 100644 index 000000000..8aa0f92fd --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/ApiUtil.java @@ -0,0 +1,50 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app105.api; + +import java.io.IOException; + +import javax.servlet.http.HttpServletResponse; + +import org.springframework.http.HttpStatus; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.server.ResponseStatusException; + +public class ApiUtil { + + public static void setExampleResponse(NativeWebRequest req, String contentType, String example) { + try { + req.getNativeResponse(HttpServletResponse.class).addHeader("Content-Type", contentType); + req.getNativeResponse(HttpServletResponse.class).getOutputStream().print(example); + } + catch (IOException e) { + throw new RuntimeException(e); + } + } + + public static void checkApiKey(NativeWebRequest req) { + if (!"1".equals(System.getenv("DISABLE_API_KEY")) && !"special-key".equals(req.getHeader("api_key"))) { + throw new ResponseStatusException(HttpStatus.UNAUTHORIZED, "Missing API key!"); + } + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/ExceptionTranslator.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/ExceptionTranslator.java new file mode 100644 index 000000000..f71866443 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/ExceptionTranslator.java @@ -0,0 +1,53 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app105.api; + +import java.util.Map; + +import javax.validation.ConstraintViolationException; + +import org.springframework.boot.web.error.ErrorAttributeOptions; +import org.springframework.boot.web.servlet.error.ErrorAttributes; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.RestControllerAdvice; +import org.springframework.web.context.request.RequestAttributes; +import org.springframework.web.context.request.WebRequest; + +@RestControllerAdvice +public class ExceptionTranslator { + + private final ErrorAttributes errorAttributes; + + public ExceptionTranslator(ErrorAttributes errorAttributes) { + this.errorAttributes = errorAttributes; + } + + @ExceptionHandler(ConstraintViolationException.class) + @ResponseStatus(HttpStatus.BAD_REQUEST) + public Map processConstraintViolationException(WebRequest request) { + request.setAttribute("javax.servlet.error.status_code", HttpStatus.BAD_REQUEST.value(), RequestAttributes.SCOPE_REQUEST); + return errorAttributes.getErrorAttributes(request, ErrorAttributeOptions.defaults()); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/HomeController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/HomeController.java new file mode 100644 index 000000000..9a4c3906c --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/HomeController.java @@ -0,0 +1,46 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app105.api; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; + +import static org.springdoc.core.Constants.SWAGGER_UI_PATH; +import static org.springframework.util.AntPathMatcher.DEFAULT_PATH_SEPARATOR; +import static org.springframework.web.servlet.view.UrlBasedViewResolver.REDIRECT_URL_PREFIX; + +/** + * Home redirection to swagger api documentation + */ +@Controller +public class HomeController { + + @Value(SWAGGER_UI_PATH) + private String swaggerUiPath; + + @GetMapping(DEFAULT_PATH_SEPARATOR) + public String index() { + return REDIRECT_URL_PREFIX + swaggerUiPath; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/pet/PetApi.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApi.java similarity index 90% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/pet/PetApi.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApi.java index c2f65c055..3d9b852b9 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/pet/PetApi.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApi.java @@ -1,18 +1,22 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ @@ -21,7 +25,7 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -package test.org.springdoc.api.app105.api.pet; +package test.org.springdoc.api.v30.app105.api.pet; import java.util.List; @@ -42,8 +46,8 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.security.SecurityScheme; import io.swagger.v3.oas.annotations.tags.Tag; -import test.org.springdoc.api.app105.model.ModelApiResponse; -import test.org.springdoc.api.app105.model.Pet; +import test.org.springdoc.api.v30.app105.model.ModelApiResponse; +import test.org.springdoc.api.v30.app105.model.Pet; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiController.java new file mode 100644 index 000000000..20658a267 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiController.java @@ -0,0 +1,48 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app105.api.pet; + +import java.util.Optional; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") + +@RestController +@RequestMapping("${openapi.openAPIPetstore.base-path:/}") +public class PetApiController implements PetApi { + + private final PetApiDelegate delegate; + + public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() { + }); + } + + @Override + public PetApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiDelegate.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiDelegate.java new file mode 100644 index 000000000..c6ca24a49 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiDelegate.java @@ -0,0 +1,146 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app105.api.pet; + +import java.util.List; +import java.util.Optional; + +import javax.validation.Valid; + +import test.org.springdoc.api.v30.app105.api.ApiUtil; +import test.org.springdoc.api.v30.app105.model.ModelApiResponse; +import test.org.springdoc.api.v30.app105.model.Pet; + +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +/** + * A delegate to be called by the {@link PetApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") + +public interface PetApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * @see PetApi#addPet + */ + default void addPet(Pet pet) { + + } + + /** + * @see PetApi#deletePet + */ + default ResponseEntity deletePet(Long petId, + String apiKey) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * @see PetApi#findPetsByStatus + */ + default ResponseEntity> findPetsByStatus(List status) { + extract(); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + default void extract() { + getRequest().ifPresent(request -> { + for (MediaType mediaType : MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + ApiUtil.setExampleResponse(request, "application/json", "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\"}"); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + ApiUtil.setExampleResponse(request, "application/xml", " 123456789 doggie aeiou aeiou"); + break; + } + } + }); + } + + /** + * @see PetApi#findPetsByTags + */ + default ResponseEntity> findPetsByTags(List tags) { + extract(); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * @see PetApi#getPetById + */ + default ResponseEntity getPetById(Long petId) { + extract(); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * @see PetApi#updatePet + */ + default ResponseEntity updatePet(Pet pet) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * @see PetApi#updatePetWithForm + */ + default ResponseEntity updatePetWithForm(Long petId, + String name, + String status) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * @see PetApi#uploadFile + */ + default ResponseEntity uploadFile(Long petId, + String additionalMetadata, + @Valid MultipartFile file) { + getRequest().ifPresent(request -> { + for (MediaType mediaType : MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}"); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiDelegateImpl.java new file mode 100644 index 000000000..9435db92d --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/pet/PetApiDelegateImpl.java @@ -0,0 +1,31 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app105.api.pet; + +import org.springframework.stereotype.Service; + +@Service +public class PetApiDelegateImpl implements PetApiDelegate { + + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/store/StoreApi.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApi.java similarity index 82% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/store/StoreApi.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApi.java index bdefa7f04..e81208072 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/store/StoreApi.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApi.java @@ -1,18 +1,22 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ @@ -21,7 +25,7 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -package test.org.springdoc.api.app105.api.store; +package test.org.springdoc.api.v30.app105.api.store; import java.util.Map; @@ -39,7 +43,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; -import test.org.springdoc.api.app105.model.Order; +import test.org.springdoc.api.v30.app105.model.Order; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiController.java new file mode 100644 index 000000000..b52e1e717 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiController.java @@ -0,0 +1,48 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app105.api.store; + +import java.util.Optional; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") + +@RestController +@RequestMapping("${openapi.openAPIPetstore.base-path:/}") +public class StoreApiController implements StoreApi { + + private final StoreApiDelegate delegate; + + public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() { + }); + } + + @Override + public StoreApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiDelegate.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiDelegate.java new file mode 100644 index 000000000..efd4dd788 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiDelegate.java @@ -0,0 +1,97 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app105.api.store; + +import java.util.Map; +import java.util.Optional; + +import test.org.springdoc.api.v30.app105.api.ApiUtil; +import test.org.springdoc.api.v30.app105.model.Order; + +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; + +/** + * A delegate to be called by the {@link StoreApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") + +public interface StoreApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * @see StoreApi#deleteOrder + */ + default ResponseEntity deleteOrder(String orderId) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * @see StoreApi#getInventory + */ + default ResponseEntity> getInventory() { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * @see StoreApi#getOrderById + */ + default ResponseEntity getOrderById(Long orderId) { + extract(); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + default void extract() { + getRequest().ifPresent(request -> { + for (MediaType mediaType : MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + ApiUtil.setExampleResponse(request, "application/json", "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\"}"); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + ApiUtil.setExampleResponse(request, "application/xml", " 123456789 123456789 123 2000-01-23T04:56:07.000Z aeiou true"); + break; + } + } + }); + } + + /** + * @see StoreApi#placeOrder + */ + default ResponseEntity placeOrder(Order order) { + extract(); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiDelegateImpl.java new file mode 100644 index 000000000..252f6c070 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/store/StoreApiDelegateImpl.java @@ -0,0 +1,31 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app105.api.store; + +import org.springframework.stereotype.Service; + +@Service +public class StoreApiDelegateImpl implements StoreApiDelegate { + + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApi.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApi.java new file mode 100644 index 000000000..d86bfb534 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApi.java @@ -0,0 +1,137 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.0). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package test.org.springdoc.api.v30.app105.api.user; + +import java.util.List; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +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 io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.tags.Tag; +import test.org.springdoc.api.v30.app105.model.User; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; + +@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") + +@Tag(name = "user", description = "the user API") +public interface UserApi { + + default UserApiDelegate getDelegate() { + return new UserApiDelegate() { + }; + } + + @Operation(summary = "Create user", tags = { "user" }) + @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) + @PostMapping(value = "/user", consumes = { "application/json" }) + default ResponseEntity createUser( + @io.swagger.v3.oas.annotations.parameters.RequestBody(description = "Created user object", required = true) @Valid @RequestBody User user) { + return getDelegate().createUser(user); + } + + @Operation(summary = "Creates list of users with given input array", tags = { "user" }) + @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) + + @PostMapping(value = "/user/createWithArray", consumes = { "application/json" }) + default ResponseEntity createUsersWithArrayInput( + @io.swagger.v3.oas.annotations.parameters.RequestBody(description = "List of user object", required = true) @Valid @RequestBody List user) { + return getDelegate().createUsersWithArrayInput(user); + } + + @Operation(summary = "Creates list of users with given input array", tags = { "user" }) + @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) + @PostMapping(value = "/user/createWithList", consumes = { "application/json" }) + default ResponseEntity createUsersWithListInput( + @io.swagger.v3.oas.annotations.parameters.RequestBody(description = "List of user object", required = true) @Valid @RequestBody List user) { + return getDelegate().createUsersWithListInput(user); + } + + @Operation(summary = "Creates list of users with given input array", tags = { "user" }) + @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) + + @DeleteMapping(value = "/user/{username}") + default ResponseEntity deleteUser( + @io.swagger.v3.oas.annotations.parameters.RequestBody(description = "The name that needs to be deleted", required = true) @PathVariable("username") String username) { + return getDelegate().deleteUser(username); + } + + @Operation(summary = "Get user by user name", tags = { "user" }) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = User.class))), + @ApiResponse(responseCode = "400", description = "Invalid username supplied"), + @ApiResponse(responseCode = "404", description = "User not found") }) + + @GetMapping(value = "/user/{username}", produces = { "application/xml", "application/json" }) + default ResponseEntity getUserByName( + @Parameter(description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username) { + return getDelegate().getUserByName(username); + } + + @Operation(summary = "Logs user into the system", tags = { "user" }) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = String.class))), + @ApiResponse(responseCode = "400", description = "Invalid username/password supplied") }) + @GetMapping(value = "/user/login", produces = { "application/xml", "application/json" }) + default ResponseEntity loginUser( + @NotNull @Parameter(description = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username, + @NotNull @Parameter(description = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password) { + return getDelegate().loginUser(username, password); + } + + @Operation(summary = "Logs out current logged in user session", tags = { "user" }) + @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "successful operation") }) + @GetMapping(value = "/user/logout") + default ResponseEntity logoutUser() { + return getDelegate().logoutUser(); + } + + @Operation(summary = "Updated user", tags = { "user" }) + @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid user supplied"), + @ApiResponse(responseCode = "404", description = "User not found") }) + @PutMapping(value = "/user/{username}", consumes = { "application/json" }) + default ResponseEntity updateUser( + @Parameter(description = "name that need to be deleted", required = true) @PathVariable("username") String username, + @io.swagger.v3.oas.annotations.parameters.RequestBody(description = "Updated user object", required = true) @Valid @RequestBody User user) { + return getDelegate().updateUser(username, user); + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiController.java new file mode 100644 index 000000000..61f913e30 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiController.java @@ -0,0 +1,48 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app105.api.user; + +import java.util.Optional; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") + +@RestController +@RequestMapping("${openapi.openAPIPetstore.base-path:/}") +public class UserApiController implements UserApi { + + private final UserApiDelegate delegate; + + public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() { + }); + } + + @Override + public UserApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiDelegate.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiDelegate.java new file mode 100644 index 000000000..e8a1bcc3e --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiDelegate.java @@ -0,0 +1,126 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app105.api.user; + +import java.util.List; +import java.util.Optional; + +import test.org.springdoc.api.v30.app105.api.ApiUtil; +import test.org.springdoc.api.v30.app105.model.User; + +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; + +/** + * A delegate to be called by the {@link UserApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") + +public interface UserApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * @see UserApi#createUser + */ + default ResponseEntity createUser(User user) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * @see UserApi#createUsersWithArrayInput + */ + default ResponseEntity createUsersWithArrayInput(List user) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * @see UserApi#createUsersWithListInput + */ + default ResponseEntity createUsersWithListInput(List user) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * @see UserApi#deleteUser + */ + default ResponseEntity deleteUser(String username) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * @see UserApi#getUserByName + */ + default ResponseEntity getUserByName(String username) { + getRequest().ifPresent(request -> { + for (MediaType mediaType : MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + ApiUtil.setExampleResponse(request, "application/json", "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\"}"); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) { + ApiUtil.setExampleResponse(request, "application/xml", " 123456789 aeiou aeiou aeiou aeiou aeiou aeiou 123"); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * @see UserApi#loginUser + */ + default ResponseEntity loginUser(String username, + String password) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * @see UserApi#logoutUser + */ + default ResponseEntity logoutUser() { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * @see UserApi#updateUser + */ + default ResponseEntity updateUser(String username, + User user) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiDelegateImpl.java new file mode 100644 index 000000000..8d7f724c6 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/api/user/UserApiDelegateImpl.java @@ -0,0 +1,31 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app105.api.user; + +import org.springframework.stereotype.Service; + +@Service +public class UserApiDelegateImpl implements UserApiDelegate { + + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Body.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Body.java new file mode 100644 index 000000000..bce45c84d --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Body.java @@ -0,0 +1,101 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app105.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +public class Body { + + @Schema(description = "Updated name of the pet") + /** + * Updated name of the pet + **/ + private String name = null; + + @Schema(description = "Updated status of the pet") + /** + * Updated status of the pet + **/ + private String status = null; + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Updated name of the pet + * + * @return name + **/ + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Body name(String name) { + this.name = name; + return this; + } + + /** + * Updated status of the pet + * + * @return status + **/ + @JsonProperty("status") + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Body status(String status) { + this.status = status; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Body {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Body1.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Body1.java new file mode 100644 index 000000000..ac554d85b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Body1.java @@ -0,0 +1,103 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app105.model; + +import java.io.File; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +public class Body1 { + + @Schema(description = "Additional data to pass to server") + /** + * Additional data to pass to server + **/ + private String additionalMetadata = null; + + @Schema(description = "file to upload") + /** + * file to upload + **/ + private File file = null; + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Additional data to pass to server + * + * @return additionalMetadata + **/ + @JsonProperty("additionalMetadata") + public String getAdditionalMetadata() { + return additionalMetadata; + } + + public void setAdditionalMetadata(String additionalMetadata) { + this.additionalMetadata = additionalMetadata; + } + + public Body1 additionalMetadata(String additionalMetadata) { + this.additionalMetadata = additionalMetadata; + return this; + } + + /** + * file to upload + * + * @return file + **/ + @JsonProperty("file") + public File getFile() { + return file; + } + + public void setFile(File file) { + this.file = file; + } + + public Body1 file(File file) { + this.file = file; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Body1 {\n"); + + sb.append(" additionalMetadata: ").append(toIndentedString(additionalMetadata)).append("\n"); + sb.append(" file: ").append(toIndentedString(file)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Category.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Category.java new file mode 100644 index 000000000..3996985a8 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Category.java @@ -0,0 +1,95 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app105.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +public class Category { + + @Schema(description = "") + private Long id = null; + + @Schema(description = "") + private String name = null; + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Get id + * + * @return id + **/ + @JsonProperty("id") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get name + * + * @return name + **/ + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Category name(String name) { + this.name = name; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Category {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/ModelApiResponse.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/ModelApiResponse.java new file mode 100644 index 000000000..457272a63 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/ModelApiResponse.java @@ -0,0 +1,118 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app105.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +public class ModelApiResponse { + + @Schema(description = "") + private Integer code = null; + + @Schema(description = "") + private String type = null; + + @Schema(description = "") + private String message = null; + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Get code + * + * @return code + **/ + @JsonProperty("code") + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public ModelApiResponse code(Integer code) { + this.code = code; + return this; + } + + /** + * Get type + * + * @return type + **/ + @JsonProperty("type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ModelApiResponse type(String type) { + this.type = type; + return this; + } + + /** + * Get message + * + * @return message + **/ + @JsonProperty("message") + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public ModelApiResponse message(String message) { + this.message = message; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ModelApiResponse {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Order.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Order.java new file mode 100644 index 000000000..cf3329f44 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Order.java @@ -0,0 +1,230 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app105.model; + +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.v3.oas.annotations.media.Schema; + +public class Order { + + @Schema(description = "") + private Long id = null; + + @Schema(description = "") + private Long petId = null; + + @Schema(description = "") + private Integer quantity = null; + + @Schema(description = "") + private Date shipDate = null; + + @Schema(description = "Order Status") + /** + * Order Status + **/ + private StatusEnum status = null; + + @Schema(description = "") + private Boolean complete = false; + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Get id + * + * @return id + **/ + @JsonProperty("id") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Order id(Long id) { + this.id = id; + return this; + } + + /** + * Get petId + * + * @return petId + **/ + @JsonProperty("petId") + public Long getPetId() { + return petId; + } + + public void setPetId(Long petId) { + this.petId = petId; + } + + public Order petId(Long petId) { + this.petId = petId; + return this; + } + + /** + * Get quantity + * + * @return quantity + **/ + @JsonProperty("quantity") + public Integer getQuantity() { + return quantity; + } + + public void setQuantity(Integer quantity) { + this.quantity = quantity; + } + + public Order quantity(Integer quantity) { + this.quantity = quantity; + return this; + } + + /** + * Get shipDate + * + * @return shipDate + **/ + @JsonProperty("shipDate") + public Date getShipDate() { + return shipDate; + } + + public void setShipDate(Date shipDate) { + this.shipDate = shipDate; + } + + public Order shipDate(Date shipDate) { + this.shipDate = shipDate; + return this; + } + + /** + * Order Status + * + * @return status + **/ + @JsonProperty("status") + public String getStatus() { + if (status == null) { + return null; + } + return status.getValue(); + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Order status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Get complete + * + * @return complete + **/ + @JsonProperty("complete") + public Boolean isisComplete() { + return complete; + } + + public void setComplete(Boolean complete) { + this.complete = complete; + } + + public Order complete(Boolean complete) { + this.complete = complete; + return this; + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Order {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); + sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); + sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public enum StatusEnum { + PLACED("placed"), + APPROVED("approved"), + DELIVERED("delivered"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonCreator + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Pet.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Pet.java new file mode 100644 index 000000000..fc23962a5 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Pet.java @@ -0,0 +1,245 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app105.model; + +import java.util.ArrayList; +import java.util.List; + +import javax.validation.constraints.NotNull; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.v3.oas.annotations.media.Schema; + +public class Pet { + + @Schema(description = "") + private Long id = null; + + @Schema(description = "") + private Category category = null; + + @Schema(example = "doggie", required = true, description = "") + private String name = null; + + @Schema(required = true, description = "") + private List photoUrls = new ArrayList(); + + @Schema(description = "") + private List tags = null; + + @Schema(description = "pet status in the store") + /** + * pet status in the store + **/ + private StatusEnum status = null; + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Get id + * + * @return id + **/ + @JsonProperty("id") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get category + * + * @return category + **/ + @JsonProperty("category") + public Category getCategory() { + return category; + } + + public void setCategory(Category category) { + this.category = category; + } + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get name + * + * @return name + **/ + @JsonProperty("name") + @NotNull + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get photoUrls + * + * @return photoUrls + **/ + @JsonProperty("photoUrls") + @NotNull + public List getPhotoUrls() { + return photoUrls; + } + + public void setPhotoUrls(List photoUrls) { + this.photoUrls = photoUrls; + } + + public Pet photoUrls(List photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get tags + * + * @return tags + **/ + @JsonProperty("tags") + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public Pet tags(List tags) { + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * pet status in the store + * + * @return status + **/ + @JsonProperty("status") + public StatusEnum getStatus() { + if (status == null) { + return null; + } + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Pet status(StatusEnum status) { + this.status = status; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public enum StatusEnum { + AVAILABLE("available"), PENDING("pending"), SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonCreator + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Tag.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Tag.java new file mode 100644 index 000000000..cbfe23282 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/Tag.java @@ -0,0 +1,95 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app105.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +public class Tag { + + @Schema(description = "") + private Long id = null; + + @Schema(description = "") + private String name = null; + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Get id + * + * @return id + **/ + @JsonProperty("id") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get name + * + * @return name + **/ + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Tag name(String name) { + this.name = name; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/User.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/User.java new file mode 100644 index 000000000..b7ccee7ba --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app105/model/User.java @@ -0,0 +1,236 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app105.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +public class User { + + @Schema(description = "") + private Long id = null; + + @Schema(description = "") + private String username = null; + + @Schema(description = "") + private String firstName = null; + + @Schema(description = "") + private String lastName = null; + + @Schema(description = "") + private String email = null; + + @Schema(description = "") + private String password = null; + + @Schema(description = "") + private String phone = null; + + @Schema(description = "User Status") + /** + * User Status + **/ + private Integer userStatus = null; + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Get id + * + * @return id + **/ + @JsonProperty("id") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public User id(Long id) { + this.id = id; + return this; + } + + /** + * Get username + * + * @return username + **/ + @JsonProperty("username") + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public User username(String username) { + this.username = username; + return this; + } + + /** + * Get firstName + * + * @return firstName + **/ + @JsonProperty("firstName") + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public User firstName(String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get lastName + * + * @return lastName + **/ + @JsonProperty("lastName") + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public User lastName(String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get email + * + * @return email + **/ + @JsonProperty("email") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Get password + * + * @return password + **/ + @JsonProperty("password") + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public User password(String password) { + this.password = password; + return this; + } + + /** + * Get phone + * + * @return phone + **/ + @JsonProperty("phone") + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public User phone(String phone) { + this.phone = phone; + return this; + } + + /** + * User Status + * + * @return userStatus + **/ + @JsonProperty("userStatus") + public Integer getUserStatus() { + return userStatus; + } + + public void setUserStatus(Integer userStatus) { + this.userStatus = userStatus; + } + + public User userStatus(Integer userStatus) { + this.userStatus = userStatus; + return this; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append("}"); + return sb.toString(); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app106/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app106/HelloController.java similarity index 54% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app106/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app106/HelloController.java index fa3a56302..e691470e8 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app106/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app106/HelloController.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app106; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app106; import java.time.Instant; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app106/SpringDocApp106Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app106/SpringDocApp106Test.java new file mode 100644 index 000000000..a94253bd9 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app106/SpringDocApp106Test.java @@ -0,0 +1,32 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app106; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp106Test extends AbstractSpringDocV30Test { + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app107/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app107/HelloController.java new file mode 100644 index 000000000..1e4f57231 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app107/HelloController.java @@ -0,0 +1,58 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app107; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping(path = "/entity-b", produces = { "application/json", "application/xml" }) + public EntityB getEntityB() { + return new EntityB(); + } + + public class EntityB { + + @Schema(required = true) + @JsonProperty("fieldB") + private String fieldB; + + @Schema(required = true) + @JsonProperty("entityA") + private EntityA entityA; + //Getters and setters... + } + + public class EntityA { + @Schema(required = true) + @JsonProperty("fieldA") + private String fieldA; + //Getters and setters... + } +} + diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app107/SpringDocApp107Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app107/SpringDocApp107Test.java new file mode 100644 index 000000000..89c796ba5 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app107/SpringDocApp107Test.java @@ -0,0 +1,32 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app107; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp107Test extends AbstractSpringDocV30Test { + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app108/ActionResult.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app108/ActionResult.java similarity index 54% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app108/ActionResult.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app108/ActionResult.java index e567e6d32..33b45680c 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app108/ActionResult.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app108/ActionResult.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app108; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app108; public class ActionResult { diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app108/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app108/HelloController.java new file mode 100644 index 000000000..d4fe2aa9e --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app108/HelloController.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app108; + +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @PostMapping + public ActionResult update(String toto) { + return null; + } +} + diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app108/SpringDocApp108Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app108/SpringDocApp108Test.java new file mode 100644 index 000000000..df32fe636 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app108/SpringDocApp108Test.java @@ -0,0 +1,32 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app108; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp108Test extends AbstractSpringDocV30Test { + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app109/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app109/HelloController.java new file mode 100644 index 000000000..d82d319df --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app109/HelloController.java @@ -0,0 +1,47 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app109; + +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.springframework.core.io.ByteArrayResource; +import org.springframework.core.io.Resource; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping("/api/v1/resource") + public Resource getResource() { + return new ByteArrayResource(new byte[] {}); + } + + @GetMapping("/api/v1/bytearray") + @ApiResponse(content = @Content(schema = @Schema(type = "string", format = "binary"))) + public byte[] getByteArray() { + return new byte[] {}; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app109/SpringDocApp109Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app109/SpringDocApp109Test.java new file mode 100644 index 000000000..b920a72a9 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app109/SpringDocApp109Test.java @@ -0,0 +1,32 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app109; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp109Test extends AbstractSpringDocV30Test { + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app11/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app11/HelloController.java similarity index 58% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app11/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app11/HelloController.java index be04d5150..4910fa62a 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app11/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app11/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app11; +package test.org.springdoc.api.v30.app11; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app11/SpringDocApp11Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app11/SpringDocApp11Test.java new file mode 100644 index 000000000..24a8663d9 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app11/SpringDocApp11Test.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app11; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp11Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/ErrorMessage.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/ErrorMessage.java new file mode 100644 index 000000000..0feee2352 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/ErrorMessage.java @@ -0,0 +1,56 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app110; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + + +public class ErrorMessage { + + private List errors; + + public ErrorMessage() { + } + + public ErrorMessage(List errors) { + this.errors = errors; + } + + public ErrorMessage(String error) { + this(Collections.singletonList(error)); + } + + public ErrorMessage(String... errors) { + this(Arrays.asList(errors)); + } + + public List getErrors() { + return errors; + } + + public void setErrors(List errors) { + this.errors = errors; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/GlobalControllerAdvice.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/GlobalControllerAdvice.java similarity index 86% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/GlobalControllerAdvice.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/GlobalControllerAdvice.java index 6f81f47a0..5abf599be 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/GlobalControllerAdvice.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/GlobalControllerAdvice.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app110; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app110; import java.util.ArrayList; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/Person.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/Person.java similarity index 66% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/Person.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/Person.java index e606bdb43..f1c2d34f7 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/Person.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/Person.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app111; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app110; import javax.validation.constraints.Email; import javax.validation.constraints.Max; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/PersonController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/PersonController.java similarity index 65% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/PersonController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/PersonController.java index d1f1db665..4193cfc2e 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/PersonController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/PersonController.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app111; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app110; import java.util.ArrayList; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/sample/PersonController2.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/PersonController2.java similarity index 65% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/sample/PersonController2.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/PersonController2.java index a4c88f28e..1bb1872d4 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/sample/PersonController2.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/PersonController2.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app112.sample; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app110; import java.util.ArrayList; import java.util.List; @@ -9,8 +31,6 @@ import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; -import test.org.springdoc.api.app112.Person; - import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/Problem.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/Problem.java new file mode 100644 index 000000000..100a3b5c8 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/Problem.java @@ -0,0 +1,57 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app110; + +public class Problem { + + private String logRef; + + private String message; + + public Problem(String logRef, String message) { + super(); + this.logRef = logRef; + this.message = message; + } + + public Problem() { + super(); + + } + + public String getLogRef() { + return logRef; + } + + public void setLogRef(String logRef) { + this.logRef = logRef; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/SpringDocApp110Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/SpringDocApp110Test.java similarity index 50% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/SpringDocApp110Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/SpringDocApp110Test.java index 128476c4e..6da768b35 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/SpringDocApp110Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app110/SpringDocApp110Test.java @@ -1,9 +1,31 @@ -package test.org.springdoc.api.app110; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app110; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.info.License; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -13,7 +35,7 @@ @TestPropertySource(properties = { "application-description=description", "application-version=v1" }) -public class SpringDocApp110Test extends AbstractSpringDocTest { +public class SpringDocApp110Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp { diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/ErrorMessage.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/ErrorMessage.java new file mode 100644 index 000000000..08de34342 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/ErrorMessage.java @@ -0,0 +1,56 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app111; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + + +public class ErrorMessage { + + private List errors; + + public ErrorMessage() { + } + + public ErrorMessage(List errors) { + this.errors = errors; + } + + public ErrorMessage(String error) { + this(Collections.singletonList(error)); + } + + public ErrorMessage(String... errors) { + this(Arrays.asList(errors)); + } + + public List getErrors() { + return errors; + } + + public void setErrors(List errors) { + this.errors = errors; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/GlobalControllerAdvice.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/GlobalControllerAdvice.java similarity index 85% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/GlobalControllerAdvice.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/GlobalControllerAdvice.java index 2078ca318..13862acd9 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/GlobalControllerAdvice.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/GlobalControllerAdvice.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app112; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app111; import java.util.ArrayList; import java.util.List; @@ -25,7 +47,7 @@ import org.springframework.web.bind.annotation.ResponseStatus; -@ControllerAdvice(basePackages = "test.org.springdoc.api.app112.sample") +@ControllerAdvice(basePackages = "test.org.springdoc.api.v30.appzzz") public class GlobalControllerAdvice //extends ResponseEntityExceptionHandler { /** diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/Person.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/Person.java similarity index 66% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/Person.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/Person.java index e110830d7..ed2e726f0 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/Person.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/Person.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app112; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app111; import javax.validation.constraints.Email; import javax.validation.constraints.Max; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/PersonController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/PersonController.java similarity index 65% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/PersonController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/PersonController.java index c320cf9b2..bfba3930e 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/PersonController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/PersonController.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app112; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app111; import java.util.ArrayList; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/PersonController2.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/PersonController2.java similarity index 65% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/PersonController2.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/PersonController2.java index 6ca0a77f2..3278a62a1 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/PersonController2.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/PersonController2.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app111; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app111; import java.util.ArrayList; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/Problem.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/Problem.java new file mode 100644 index 000000000..95a71f830 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/Problem.java @@ -0,0 +1,57 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app111; + +public class Problem { + + private String logRef; + + private String message; + + public Problem(String logRef, String message) { + super(); + this.logRef = logRef; + this.message = message; + } + + public Problem() { + super(); + + } + + public String getLogRef() { + return logRef; + } + + public void setLogRef(String logRef) { + this.logRef = logRef; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/SpringDocApp111Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/SpringDocApp111Test.java similarity index 50% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/SpringDocApp111Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/SpringDocApp111Test.java index f35061a4f..865c5ffb3 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/SpringDocApp111Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app111/SpringDocApp111Test.java @@ -1,9 +1,31 @@ -package test.org.springdoc.api.app111; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app111; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.info.License; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -13,7 +35,7 @@ @TestPropertySource(properties = { "application-description=description", "application-version=v1" }) -public class SpringDocApp111Test extends AbstractSpringDocTest { +public class SpringDocApp111Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp { diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/ErrorMessage.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/ErrorMessage.java new file mode 100644 index 000000000..3b168b9c3 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/ErrorMessage.java @@ -0,0 +1,56 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app112; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + + +public class ErrorMessage { + + private List errors; + + public ErrorMessage() { + } + + public ErrorMessage(List errors) { + this.errors = errors; + } + + public ErrorMessage(String error) { + this(Collections.singletonList(error)); + } + + public ErrorMessage(String... errors) { + this(Arrays.asList(errors)); + } + + public List getErrors() { + return errors; + } + + public void setErrors(List errors) { + this.errors = errors; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/GlobalControllerAdvice.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/GlobalControllerAdvice.java similarity index 85% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/GlobalControllerAdvice.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/GlobalControllerAdvice.java index 74f74d6db..78d906b25 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app111/GlobalControllerAdvice.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/GlobalControllerAdvice.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app111; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app112; import java.util.ArrayList; import java.util.List; @@ -25,7 +47,7 @@ import org.springframework.web.bind.annotation.ResponseStatus; -@ControllerAdvice(basePackages = "test.org.springdoc.api.appzzz") +@ControllerAdvice(basePackages = "test.org.springdoc.api.v30.app112.sample") public class GlobalControllerAdvice //extends ResponseEntityExceptionHandler { /** diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/Person.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/Person.java similarity index 66% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/Person.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/Person.java index 388928874..a850e30c0 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/Person.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/Person.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app110; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app112; import javax.validation.constraints.Email; import javax.validation.constraints.Max; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/PersonController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/PersonController.java similarity index 65% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/PersonController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/PersonController.java index 1c867a033..9b5685c88 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/PersonController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/PersonController.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app110; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app112; import java.util.ArrayList; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/Problem.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/Problem.java new file mode 100644 index 000000000..7313d8ada --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/Problem.java @@ -0,0 +1,57 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app112; + +public class Problem { + + private String logRef; + + private String message; + + public Problem(String logRef, String message) { + super(); + this.logRef = logRef; + this.message = message; + } + + public Problem() { + super(); + + } + + public String getLogRef() { + return logRef; + } + + public void setLogRef(String logRef) { + this.logRef = logRef; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/SpringDocApp112Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/SpringDocApp112Test.java similarity index 50% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/SpringDocApp112Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/SpringDocApp112Test.java index 4984fc051..a2cde84a2 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app112/SpringDocApp112Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/SpringDocApp112Test.java @@ -1,9 +1,31 @@ -package test.org.springdoc.api.app112; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app112; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.info.License; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -13,7 +35,7 @@ @TestPropertySource(properties = { "application-description=description", "application-version=v1" }) -public class SpringDocApp112Test extends AbstractSpringDocTest { +public class SpringDocApp112Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp { diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/PersonController2.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/sample/PersonController2.java similarity index 63% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/PersonController2.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/sample/PersonController2.java index 560925069..d6da662cf 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app110/PersonController2.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app112/sample/PersonController2.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app110; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app112.sample; import java.util.ArrayList; import java.util.List; @@ -9,6 +31,8 @@ import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; +import test.org.springdoc.api.v30.app112.Person; + import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app113/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app113/HelloController.java new file mode 100644 index 000000000..adefcf50f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app113/HelloController.java @@ -0,0 +1,45 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app113; + +import java.util.Optional; + +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @PostMapping("/lol") + public void test(@RequestBody(required = false) Body body) { + } + + @PostMapping("/lol2") + public void test2(@RequestBody Optional body) { + } + + public class Body { + public String field; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app113/SpringDocApp113Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app113/SpringDocApp113Test.java new file mode 100644 index 000000000..d2355bb5c --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app113/SpringDocApp113Test.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app113; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + + +public class SpringDocApp113Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app114/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app114/HelloController.java new file mode 100644 index 000000000..af88ce42b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app114/HelloController.java @@ -0,0 +1,47 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app114; + +import javax.money.MonetaryAmount; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @PostMapping(value = "/foos1", consumes = MediaType.APPLICATION_JSON_VALUE) + MonetaryAmount getCurrency(@RequestBody CarDTO carDTO) { + return carDTO.price; + } + + class CarDTO { + @JsonProperty("price") + MonetaryAmount price; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app114/SpringDocApp114Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app114/SpringDocApp114Test.java new file mode 100644 index 000000000..339c7c8c4 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app114/SpringDocApp114Test.java @@ -0,0 +1,41 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app114; + +import javax.money.MonetaryAmount; + +import org.springdoc.core.SpringDocUtils; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + + +public class SpringDocApp114Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + + static { + SpringDocUtils.getConfig().replaceWithClass(MonetaryAmount.class, org.springdoc.core.converters.models.MonetaryAmount.class); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app115/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app115/HelloController.java new file mode 100644 index 000000000..10c13a96d --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app115/HelloController.java @@ -0,0 +1,41 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app115; + +import java.time.Duration; + +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping(value = "/api/v2/timeout", + consumes = { MediaType.ALL_VALUE }, + produces = { MediaType.APPLICATION_JSON_VALUE }) + public Duration timeouts() { + return Duration.ofSeconds(5); + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app115/JavaTimeOperationCustomizer.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app115/JavaTimeOperationCustomizer.java similarity index 58% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app115/JavaTimeOperationCustomizer.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app115/JavaTimeOperationCustomizer.java index ff0bd2b48..db1af628f 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app115/JavaTimeOperationCustomizer.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app115/JavaTimeOperationCustomizer.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app115; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app115; import java.time.Duration; import java.util.Map; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app115/SpringDocApp115Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app115/SpringDocApp115Test.java new file mode 100644 index 000000000..2c6850d8f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app115/SpringDocApp115Test.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app115; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + + +public class SpringDocApp115Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app116/FooErrorHandler.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app116/FooErrorHandler.java new file mode 100644 index 000000000..e90180d7a --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app116/FooErrorHandler.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app116; + +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ExceptionHandler; + +@ControllerAdvice(assignableTypes = HelloController.class) +public class FooErrorHandler { + + @ExceptionHandler + public ResponseEntity storeAssignmentPublishingError(Exception e) { + return new ResponseEntity<>("foo", HttpStatus.INTERNAL_SERVER_ERROR); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app116/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app116/HelloController.java new file mode 100644 index 000000000..45d7f8788 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app116/HelloController.java @@ -0,0 +1,45 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app116; + +import io.swagger.v3.oas.annotations.OpenAPIDefinition; +import io.swagger.v3.oas.annotations.info.Info; +import io.swagger.v3.oas.annotations.tags.Tag; + +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/api") +@OpenAPIDefinition(info = @Info(title = "API Examples", version = "1.0"), tags = @Tag(name = "Operations")) +public class HelloController { + + @PostMapping("/foo") + public String create(@RequestBody String foo) { + return "foo"; + } +} + + diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app116/SpringDocApp116Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app116/SpringDocApp116Test.java new file mode 100644 index 000000000..764fb1e60 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app116/SpringDocApp116Test.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app116; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + + +public class SpringDocApp116Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app117/HelloApplication.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app117/HelloApplication.java similarity index 84% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app117/HelloApplication.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app117/HelloApplication.java index 99db6314f..2e00bdd51 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app117/HelloApplication.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app117/HelloApplication.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app117; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app117; import java.io.IOException; import java.net.URI; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app117/SpringDocApp117Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app117/SpringDocApp117Test.java new file mode 100644 index 000000000..aaa46ff4b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app117/SpringDocApp117Test.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app117; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + + +public class SpringDocApp117Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app168/AbstractParent.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app118/AbstractParent.java similarity index 56% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app168/AbstractParent.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app118/AbstractParent.java index fde031f7d..44184a228 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app168/AbstractParent.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app118/AbstractParent.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app168; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app118; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonSubTypes.Type; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app118/ConcreteParent.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app118/ConcreteParent.java similarity index 56% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app118/ConcreteParent.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app118/ConcreteParent.java index 217de4c9f..5c6c8b5ec 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app118/ConcreteParent.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app118/ConcreteParent.java @@ -1,47 +1,69 @@ -package test.org.springdoc.api.app118; - -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonSubTypes.Type; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeInfo.Id; - -@JsonTypeInfo(use = Id.NAME, property = "type") -@JsonSubTypes({ - @Type(ChildOfConcrete1.class), - @Type(ChildOfConcrete2.class) -}) -public class ConcreteParent { - private int id; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } -} - -class ChildOfConcrete1 extends ConcreteParent { - private String concreteChild1Param; - - public String getConcreteChild1Param() { - return concreteChild1Param; - } - - public void setConcreteChild1Param(String concreteChild1Param) { - this.concreteChild1Param = concreteChild1Param; - } -} - -class ChildOfConcrete2 extends ConcreteParent { - private String concreteChild2Param; - - public String getConcreteChild2Param() { - return concreteChild2Param; - } - - public void setConcreteChild2Param(String concreteChild2Param) { - this.concreteChild2Param = concreteChild2Param; - } -} +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app118; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonSubTypes.Type; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeInfo.Id; + +@JsonTypeInfo(use = Id.NAME, property = "type") +@JsonSubTypes({ + @Type(ChildOfConcrete1.class), + @Type(ChildOfConcrete2.class) +}) +public class ConcreteParent { + private int id; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } +} + +class ChildOfConcrete1 extends ConcreteParent { + private String concreteChild1Param; + + public String getConcreteChild1Param() { + return concreteChild1Param; + } + + public void setConcreteChild1Param(String concreteChild1Param) { + this.concreteChild1Param = concreteChild1Param; + } +} + +class ChildOfConcrete2 extends ConcreteParent { + private String concreteChild2Param; + + public String getConcreteChild2Param() { + return concreteChild2Param; + } + + public void setConcreteChild2Param(String concreteChild2Param) { + this.concreteChild2Param = concreteChild2Param; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app118/Controller.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app118/Controller.java similarity index 56% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app118/Controller.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app118/Controller.java index ed7525b33..73cad149e 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app118/Controller.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app118/Controller.java @@ -1,44 +1,66 @@ -package test.org.springdoc.api.app118; - -import java.util.List; - -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("class-hierarchy") -public class Controller { - @PostMapping("abstract-parent") - public Response abstractParent(@RequestBody AbstractParent payload) { - return null; - } - - @PostMapping("concrete-parent") - public Response concreteParent(@RequestBody ConcreteParent payload) { - return null; - } -} - -class Response { - AbstractParent abstractParent; - - List concreteParents; - - public AbstractParent getAbstractParent() { - return abstractParent; - } - - public void setAbstractParent(AbstractParent abstractParent) { - this.abstractParent = abstractParent; - } - - public List getConcreteParents() { - return concreteParents; - } - - public void setConcreteParents(List concreteParents) { - this.concreteParents = concreteParents; - } -} +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app118; + +import java.util.List; + +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("class-hierarchy") +public class Controller { + @PostMapping("abstract-parent") + public Response abstractParent(@RequestBody AbstractParent payload) { + return null; + } + + @PostMapping("concrete-parent") + public Response concreteParent(@RequestBody ConcreteParent payload) { + return null; + } +} + +class Response { + AbstractParent abstractParent; + + List concreteParents; + + public AbstractParent getAbstractParent() { + return abstractParent; + } + + public void setAbstractParent(AbstractParent abstractParent) { + this.abstractParent = abstractParent; + } + + public List getConcreteParents() { + return concreteParents; + } + + public void setConcreteParents(List concreteParents) { + this.concreteParents = concreteParents; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app118/SpringDocApp118Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app118/SpringDocApp118Test.java new file mode 100644 index 000000000..097f86a55 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app118/SpringDocApp118Test.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app118; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + + +public class SpringDocApp118Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app119/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app119/HelloController.java similarity index 61% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app119/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app119/HelloController.java index b94ead0b3..44665a1da 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app119/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app119/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app119; +package test.org.springdoc.api.v30.app119; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app119/JsonRequest.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app119/JsonRequest.java new file mode 100644 index 000000000..fc99822fc --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app119/JsonRequest.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app119; + +public class JsonRequest { + + private String name; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app119/SpringDocApp119Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app119/SpringDocApp119Test.java new file mode 100644 index 000000000..540a67066 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app119/SpringDocApp119Test.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app119; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + + +public class SpringDocApp119Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app12/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app12/HelloController.java new file mode 100644 index 000000000..c626c624d --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app12/HelloController.java @@ -0,0 +1,43 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app12; + +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 org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping(value = "/persons") + @Operation(parameters = { + @Parameter(name = "name", in = ParameterIn.QUERY, schema = @Schema(implementation = String.class)) }) + public String persons() { + return "OK"; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app12/SpringDocApp12Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app12/SpringDocApp12Test.java new file mode 100644 index 000000000..0867ddc54 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app12/SpringDocApp12Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app12; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp12Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app120/AccountId.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app120/AccountId.java similarity index 58% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app120/AccountId.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app120/AccountId.java index 0cb803f58..d62855bbd 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app120/AccountId.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app120/AccountId.java @@ -1,21 +1,25 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app120; +package test.org.springdoc.api.v30.app120; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app120/MetaAnnotationController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app120/MetaAnnotationController.java similarity index 86% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app120/MetaAnnotationController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app120/MetaAnnotationController.java index 835014cdc..23e1a51d2 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app120/MetaAnnotationController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app120/MetaAnnotationController.java @@ -1,21 +1,25 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app120; +package test.org.springdoc.api.v30.app120; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app120/SpringDocApp120Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app120/SpringDocApp120Test.java new file mode 100644 index 000000000..6fd9b9ad0 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app120/SpringDocApp120Test.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ +package test.org.springdoc.api.v30.app120; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + + +/** + * Tests Spring meta-annotations as method parameters + */ +public class SpringDocApp120Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app121/InheritedRequestParams.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app121/InheritedRequestParams.java new file mode 100644 index 000000000..b6c59fb71 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app121/InheritedRequestParams.java @@ -0,0 +1,42 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app121; + +import javax.validation.constraints.NotBlank; + +import io.swagger.v3.oas.annotations.Parameter; + +public class InheritedRequestParams extends RequestParams { + + @Parameter(description = "parameter from child of RequestParams") + @NotBlank + private String childParam; + + public String getChildParam() { + return childParam; + } + + public void setChildParam(String childParam) { + this.childParam = childParam; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app121/RequestParams.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app121/RequestParams.java similarity index 72% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app121/RequestParams.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app121/RequestParams.java index 5f2a0e4df..9270cf787 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app121/RequestParams.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app121/RequestParams.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app121; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app121; import java.math.BigInteger; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app121/SpringDocApp121Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app121/SpringDocApp121Test.java similarity index 79% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app121/SpringDocApp121Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app121/SpringDocApp121Test.java index 19bb95788..7295cc05f 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app121/SpringDocApp121Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app121/SpringDocApp121Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,11 +18,10 @@ * * * * * * - * */ -package test.org.springdoc.api.app121; +package test.org.springdoc.api.v30.app121; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -30,7 +29,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp121Test extends AbstractSpringDocTest { +public class SpringDocApp121Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app121/TestController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app121/TestController.java new file mode 100644 index 000000000..6f97c476f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app121/TestController.java @@ -0,0 +1,38 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app121; + +import org.springdoc.api.annotations.ParameterObject; + +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class TestController { + + @PostMapping("test") + public InheritedRequestParams getTest(@RequestParam String param, @ParameterObject InheritedRequestParams requestParams) { + return requestParams; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app122/BaseController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app122/BaseController.java similarity index 91% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app122/BaseController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app122/BaseController.java index 5ca060260..90bcffb0c 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app122/BaseController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app122/BaseController.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,10 +18,9 @@ * * * * * * - * */ -package test.org.springdoc.api.app122; +package test.org.springdoc.api.v30.app122; import io.swagger.v3.oas.annotations.Operation; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app122/BaseObject.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app122/BaseObject.java similarity index 88% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app122/BaseObject.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app122/BaseObject.java index 4ada247dd..8adf1030e 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app122/BaseObject.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app122/BaseObject.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,10 +18,9 @@ * * * * * * - * */ -package test.org.springdoc.api.app122; +package test.org.springdoc.api.v30.app122; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app122/CustomerDto.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app122/CustomerDto.java similarity index 89% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app122/CustomerDto.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app122/CustomerDto.java index a16317611..6f6b69bb4 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app122/CustomerDto.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app122/CustomerDto.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,10 +18,9 @@ * * * * * * - * */ -package test.org.springdoc.api.app122; +package test.org.springdoc.api.v30.app122; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app122/FirstController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app122/FirstController.java similarity index 89% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app122/FirstController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app122/FirstController.java index eed9adedf..299934005 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app122/FirstController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app122/FirstController.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,10 +18,9 @@ * * * * * * - * */ -package test.org.springdoc.api.app122; +package test.org.springdoc.api.v30.app122; import io.swagger.v3.oas.annotations.tags.Tag; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app122/SpringDocApp122Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app122/SpringDocApp122Test.java similarity index 79% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app122/SpringDocApp122Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app122/SpringDocApp122Test.java index 228d2e053..0a2ac8e7f 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app122/SpringDocApp122Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app122/SpringDocApp122Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,11 +18,10 @@ * * * * * * - * */ -package test.org.springdoc.api.app122; +package test.org.springdoc.api.v30.app122; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -30,7 +29,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp122Test extends AbstractSpringDocTest { +public class SpringDocApp122Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app122/Wrapper.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app122/Wrapper.java similarity index 88% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app122/Wrapper.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app122/Wrapper.java index c12d87049..0c8f136ca 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app122/Wrapper.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app122/Wrapper.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,10 +18,9 @@ * * * * * * - * */ -package test.org.springdoc.api.app122; +package test.org.springdoc.api.v30.app122; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app123/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app123/HelloController.java new file mode 100644 index 000000000..1e2d1d345 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app123/HelloController.java @@ -0,0 +1,40 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app123; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.responses.ApiResponse; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping(value = "/hello/{numTelco}") + @Operation(summary = "GET Persons", responses = @ApiResponse(responseCode = "418")) + public T index(@PathVariable("numTelco") String numTel, String adresse) { + return null; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app123/MyExceptionHandler.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app123/MyExceptionHandler.java similarity index 50% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app123/MyExceptionHandler.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app123/MyExceptionHandler.java index 758c3dbc9..6adf73c8d 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app123/MyExceptionHandler.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app123/MyExceptionHandler.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app123; +package test.org.springdoc.api.v30.app123; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.responses.ApiResponse; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app123/SpringDocApp123Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app123/SpringDocApp123Test.java similarity index 79% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app123/SpringDocApp123Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app123/SpringDocApp123Test.java index d6b6fb007..2e361c54f 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app123/SpringDocApp123Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app123/SpringDocApp123Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,11 +18,10 @@ * * * * * * - * */ -package test.org.springdoc.api.app123; +package test.org.springdoc.api.v30.app123; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -30,7 +29,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp123Test extends AbstractSpringDocTest { +public class SpringDocApp123Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app124/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app124/HelloController.java similarity index 57% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app124/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app124/HelloController.java index cea3dea84..fe48c7970 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app124/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app124/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app124; +package test.org.springdoc.api.v30.app124; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app124/MyExceptionHandler.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app124/MyExceptionHandler.java new file mode 100644 index 000000000..f1a7c3f41 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app124/MyExceptionHandler.java @@ -0,0 +1,38 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app124; + +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.RestControllerAdvice; + +@RestControllerAdvice +public class MyExceptionHandler { + + @ExceptionHandler(RuntimeException.class) + @ResponseStatus(HttpStatus.BAD_GATEWAY) + public Object gateway(RuntimeException e) { + return null; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app124/SpringDocApp124Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app124/SpringDocApp124Test.java similarity index 79% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app124/SpringDocApp124Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app124/SpringDocApp124Test.java index d178723a9..1bdb45e6b 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app124/SpringDocApp124Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app124/SpringDocApp124Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,11 +18,10 @@ * * * * * * - * */ -package test.org.springdoc.api.app124; +package test.org.springdoc.api.v30.app124; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -30,7 +29,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp124Test extends AbstractSpringDocTest { +public class SpringDocApp124Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app125/DeprecatedEntity.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app125/DeprecatedEntity.java new file mode 100644 index 000000000..d4cc47754 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app125/DeprecatedEntity.java @@ -0,0 +1,57 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app125; + +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * @author bnasslahsen + */ +public class DeprecatedEntity +{ + @Schema(deprecated = false) + private String myNonDeprecatedField; + + @Schema(deprecated = true) + private String mydeprecatedField; + + public String getMyNonDeprecatedField() + { + return myNonDeprecatedField; + } + + @Deprecated + public DeprecatedEntity setMyNonDeprecatedField(String myNonDeprecatedField) + { + this.myNonDeprecatedField = myNonDeprecatedField; + return this; + } + + public String getMydeprecatedField() { + return mydeprecatedField; + } + + public void setMydeprecatedField(String mydeprecatedField) { + this.mydeprecatedField = mydeprecatedField; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app125/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app125/HelloController.java new file mode 100644 index 000000000..0dc1a11c4 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app125/HelloController.java @@ -0,0 +1,47 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app125; + +import javax.validation.constraints.NotNull; + +import org.springdoc.api.annotations.ParameterObject; + +import org.springframework.data.domain.Pageable; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author bnasslahsen + */ +@RestController +public class HelloController { + + @GetMapping(value = "/search", produces = { "application/xml", "application/json" }) + public DeprecatedEntity getAllPets(@NotNull String toto) { + return null; + } + + @GetMapping(value = "/search2", produces = { "application/xml", "application/json" }) + public void getAllPets2(@ParameterObject Pageable pageable) { + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app125/SpringDocApp125Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app125/SpringDocApp125Test.java similarity index 87% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app125/SpringDocApp125Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app125/SpringDocApp125Test.java index 4f415b675..164ecc6b2 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app125/SpringDocApp125Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app125/SpringDocApp125Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,9 +18,8 @@ * * * * * * - * */ -package test.org.springdoc.api.app125; +package test.org.springdoc.api.v30.app125; import java.util.Optional; @@ -28,7 +27,7 @@ import io.swagger.v3.core.converter.ModelConverters; import org.junit.jupiter.api.BeforeAll; import org.springdoc.core.converters.SchemaPropertyDeprecatingConverter; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.test.context.TestPropertySource; @@ -38,7 +37,7 @@ * Tests Spring meta-annotations as method parameters */ @TestPropertySource(properties = "springdoc.model-converters.deprecating-converter.enabled=false") -public class SpringDocApp125Test extends AbstractSpringDocTest { +public class SpringDocApp125Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app126/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app126/HelloController.java similarity index 71% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app126/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app126/HelloController.java index 1ddcf5991..60c836a30 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app126/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app126/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app126; +package test.org.springdoc.api.v30.app126; import java.util.ArrayList; import java.util.Collection; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app126/Problem.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app126/Problem.java similarity index 70% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app126/Problem.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app126/Problem.java index 400ef6314..60cf7c9c0 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app126/Problem.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app126/Problem.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app126; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app126; import java.net.URI; import java.util.Collections; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app126/SecurityProblemResponsesConfiguration.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app126/SecurityProblemResponsesConfiguration.java similarity index 71% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app126/SecurityProblemResponsesConfiguration.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app126/SecurityProblemResponsesConfiguration.java index a6b34739f..4b8287bfa 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app126/SecurityProblemResponsesConfiguration.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app126/SecurityProblemResponsesConfiguration.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app126; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app126; import java.io.IOException; import java.util.AbstractMap; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app126/SpringDocApp126Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app126/SpringDocApp126Test.java similarity index 88% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app126/SpringDocApp126Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app126/SpringDocApp126Test.java index 7eb1b364c..a88c15d39 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app126/SpringDocApp126Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app126/SpringDocApp126Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,9 +18,8 @@ * * * * * * - * */ -package test.org.springdoc.api.app126; +package test.org.springdoc.api.v30.app126; import java.util.List; import java.util.Map; @@ -30,7 +29,7 @@ import io.swagger.v3.core.converter.ResolvedSchema; import io.swagger.v3.oas.models.responses.ApiResponse; import org.springdoc.core.customizers.OpenApiCustomiser; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; @@ -39,7 +38,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp126Test extends AbstractSpringDocTest { +public class SpringDocApp126Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp { diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/AbstractObject.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/AbstractObject.java new file mode 100644 index 000000000..e4d14eeac --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/AbstractObject.java @@ -0,0 +1,53 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app127; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXISTING_PROPERTY, + property = "type", + visible = true +) +@JsonSubTypes({ + @JsonSubTypes.Type(value = ConcreteObjectA.class, name = "Type A") +}) +public abstract class AbstractObject { + + private final ConcreteType type; + private final String name; + + protected AbstractObject(ConcreteType type, String name) { + this.type = type; + this.name = name; + } + + public ConcreteType getType() { + return type; + } + + public String getName() { + return name; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/ConcreteObjectA.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/ConcreteObjectA.java new file mode 100644 index 000000000..2545878f2 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/ConcreteObjectA.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app127; + +public class ConcreteObjectA extends AbstractObject { + + private final String description; + + public ConcreteObjectA(String name, String description) { + super(ConcreteType.TYPE_A, name); + this.description = description; + } + + public String getDescription() { + return description; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/ConcreteType.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/ConcreteType.java new file mode 100644 index 000000000..6ce550d83 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/ConcreteType.java @@ -0,0 +1,38 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app127; + +public enum ConcreteType { + TYPE_A("Type A"), + TYPE_B("Type B"); + + private final String name; + + ConcreteType(String name) { + this.name = name; + } + + public String getName() { + return name; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/Controller.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/Controller.java similarity index 54% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/Controller.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/Controller.java index f73d77a2a..dbba4dc92 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/Controller.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/Controller.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app127; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app127; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/SpringDocApp127Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/SpringDocApp127Test.java similarity index 87% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/SpringDocApp127Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/SpringDocApp127Test.java index bb0463b77..f4830513b 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app127/SpringDocApp127Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/SpringDocApp127Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,14 +18,13 @@ * * * * * * - * */ -package test.org.springdoc.api.app127; +package test.org.springdoc.api.v30.app127; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.test.web.servlet.MvcResult; @@ -37,7 +36,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp127Test extends AbstractSpringDocTest { +public class SpringDocApp127Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/Umbrella.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/Umbrella.java new file mode 100644 index 000000000..fd5af155d --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app127/Umbrella.java @@ -0,0 +1,39 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app127; + +import io.swagger.v3.oas.annotations.media.Schema; + +public class Umbrella { + + @Schema(description = "This reference to abstract class causes weird YAML tag to be added", anyOf = ConcreteObjectA.class) + private final AbstractObject object; + + public Umbrella(AbstractObject object) { + this.object = object; + } + + public AbstractObject getObject() { + return object; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app128/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app128/HelloController.java new file mode 100644 index 000000000..fbe4c488c --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app128/HelloController.java @@ -0,0 +1,39 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app128; + + +import org.springframework.boot.actuate.endpoint.web.annotation.RestControllerEndpoint; +import org.springframework.stereotype.Component; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; + +@RestControllerEndpoint(id = "tenant") +@Component +public class HelloController { + + @GetMapping("/customer/{id}") + public String getTenantById(@PathVariable("id") String customerId) { + return "Tenant_" + customerId; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app128/SpringDocApp128Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app128/SpringDocApp128Test.java similarity index 90% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app128/SpringDocApp128Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app128/SpringDocApp128Test.java index 0df54d36e..c76f4b059 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app128/SpringDocApp128Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app128/SpringDocApp128Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,14 +18,13 @@ * * * * * * - * */ -package test.org.springdoc.api.app128; +package test.org.springdoc.api.v30.app128; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; import org.springdoc.core.SpringDocUtils; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController; @@ -44,7 +43,7 @@ @TestPropertySource(properties = { "springdoc.show-actuator=true", "management.endpoints.enabled-by-default=true", "management.endpoints.web.exposure.include = tenant" }) -public class SpringDocApp128Test extends AbstractSpringDocTest { +public class SpringDocApp128Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app129/ActualReturnedEntity.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app129/ActualReturnedEntity.java new file mode 100644 index 000000000..364627f97 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app129/ActualReturnedEntity.java @@ -0,0 +1,32 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app129; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ActualReturnedEntity { + + @JsonProperty + String result; + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app129/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app129/HelloController.java similarity index 50% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app129/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app129/HelloController.java index 88cc99740..75df72a66 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app129/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app129/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app129; +package test.org.springdoc.api.v30.app129; import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app129/OperationResponse.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app129/OperationResponse.java new file mode 100644 index 000000000..fb68c41ab --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app129/OperationResponse.java @@ -0,0 +1,31 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app129; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class OperationResponse { + + @JsonProperty + String operationResult; +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app129/SpringDocApp129Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app129/SpringDocApp129Test.java similarity index 79% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app129/SpringDocApp129Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app129/SpringDocApp129Test.java index 77f7f46a2..82ed5a458 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app129/SpringDocApp129Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app129/SpringDocApp129Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,11 +18,10 @@ * * * * * * - * */ -package test.org.springdoc.api.app129; +package test.org.springdoc.api.v30.app129; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -30,7 +29,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp129Test extends AbstractSpringDocTest { +public class SpringDocApp129Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app13/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app13/HelloController.java new file mode 100644 index 000000000..71ba18ea6 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app13/HelloController.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app13; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping(value = "/persons") + public String persons(final PersonDTO dto) { + return "OK"; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app13/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app13/PersonDTO.java new file mode 100644 index 000000000..e0fee7875 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app13/PersonDTO.java @@ -0,0 +1,64 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app13; + +public class PersonDTO { + private String email; + + private String firstName; + + private String lastName; + + public PersonDTO() { + } + + public PersonDTO(final String email, final String firstName, final String lastName) { + this.email = email; + this.firstName = firstName; + this.lastName = lastName; + } + + public String getEmail() { + return email; + } + + public void setEmail(final String email) { + this.email = email; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(final String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(final String lastName) { + this.lastName = lastName; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app13/SpringDocApp13Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app13/SpringDocApp13Test.java new file mode 100644 index 000000000..898dbb9e9 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app13/SpringDocApp13Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app13; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp13Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app130/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app130/HelloController.java new file mode 100644 index 000000000..c203d7398 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app130/HelloController.java @@ -0,0 +1,41 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app130; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @PostMapping(value = "/values/data") + TrackerData list(TrackerData toto) { + return toto; + } + + @GetMapping(value = "/values/datakk") + TrackerData get(TrackerData toto) { + return toto; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app130/SpringDocApp130Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app130/SpringDocApp130Test.java similarity index 79% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app130/SpringDocApp130Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app130/SpringDocApp130Test.java index b2a08d164..a63060303 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app130/SpringDocApp130Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app130/SpringDocApp130Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,11 +18,10 @@ * * * * * * - * */ -package test.org.springdoc.api.app130; +package test.org.springdoc.api.v30.app130; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -30,7 +29,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp130Test extends AbstractSpringDocTest { +public class SpringDocApp130Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app130/TrackerData.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app130/TrackerData.java new file mode 100644 index 000000000..f9b4bdd94 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app130/TrackerData.java @@ -0,0 +1,45 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app130; + +import java.time.Instant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.Hidden; +import io.swagger.v3.oas.annotations.media.Schema; + +@Hidden +public class TrackerData { + + @JsonProperty("trackerId") + String trackerId; + + @Schema(name = "timestamp", type = "string", format = "date-time", required = true, example = "2018-01-01T00:00:00Z") + @JsonProperty("timestamp") + Instant timestamp; + + @Schema(name = "value", type = "number", format = "double", description = "The data value", required = true, example = "19.0") + @JsonProperty("value") + Double value; + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app131/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app131/HelloController.java similarity index 72% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app131/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app131/HelloController.java index 251594dae..bed758d76 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app131/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app131/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app131; +package test.org.springdoc.api.v30.app131; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app131/Organization.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app131/Organization.java similarity index 53% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app131/Organization.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app131/Organization.java index eaaa2356f..dd69eff66 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app131/Organization.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app131/Organization.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app131; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app131; import java.util.UUID; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app131/RestControllerError.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app131/RestControllerError.java new file mode 100644 index 000000000..45788e38a --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app131/RestControllerError.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app131; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class RestControllerError { + + @JsonProperty + private String id; + + @JsonProperty + private String message; + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app131/SpringDocApp131Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app131/SpringDocApp131Test.java similarity index 79% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app131/SpringDocApp131Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app131/SpringDocApp131Test.java index 6c507dea2..d7f0ed257 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app131/SpringDocApp131Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app131/SpringDocApp131Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,11 +18,10 @@ * * * * * * - * */ -package test.org.springdoc.api.app131; +package test.org.springdoc.api.v30.app131; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -30,7 +29,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp131Test extends AbstractSpringDocTest { +public class SpringDocApp131Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app132/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app132/HelloController.java similarity index 73% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app132/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app132/HelloController.java index 059e7e259..fc5e46aaa 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app132/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app132/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app132; +package test.org.springdoc.api.v30.app132; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app132/Organization.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app132/Organization.java similarity index 53% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app132/Organization.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app132/Organization.java index c18961a86..9a9bbee82 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app132/Organization.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app132/Organization.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app132; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app132; import java.util.UUID; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app132/RestControllerError.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app132/RestControllerError.java new file mode 100644 index 000000000..18e7195b0 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app132/RestControllerError.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app132; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class RestControllerError { + + @JsonProperty + private String id; + + @JsonProperty + private String message; + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app132/SpringDocApp132Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app132/SpringDocApp132Test.java similarity index 79% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app132/SpringDocApp132Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app132/SpringDocApp132Test.java index a151eaa89..6f48171f1 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app132/SpringDocApp132Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app132/SpringDocApp132Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,11 +18,10 @@ * * * * * * - * */ -package test.org.springdoc.api.app132; +package test.org.springdoc.api.v30.app132; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -30,7 +29,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp132Test extends AbstractSpringDocTest { +public class SpringDocApp132Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app133/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app133/HelloController.java similarity index 59% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app133/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app133/HelloController.java index 7032cdfb7..126499457 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app133/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app133/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app133; +package test.org.springdoc.api.v30.app133; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app133/SpringDocApp133Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app133/SpringDocApp133Test.java similarity index 79% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app133/SpringDocApp133Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app133/SpringDocApp133Test.java index 4b219ae27..b4311ae70 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app133/SpringDocApp133Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app133/SpringDocApp133Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,11 +18,10 @@ * * * * * * - * */ -package test.org.springdoc.api.app133; +package test.org.springdoc.api.v30.app133; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -30,7 +29,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp133Test extends AbstractSpringDocTest { +public class SpringDocApp133Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app134/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app134/HelloController.java similarity index 81% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app134/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app134/HelloController.java index 4a949a2cc..ac02181b3 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app134/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app134/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app134; +package test.org.springdoc.api.v30.app134; import java.util.Collections; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app134/OpenApiConfig.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app134/OpenApiConfig.java similarity index 58% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app134/OpenApiConfig.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app134/OpenApiConfig.java index 12aba820d..b292e404d 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app134/OpenApiConfig.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app134/OpenApiConfig.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app134; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app134; import org.springdoc.core.GroupedOpenApi; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app134/SpringDocApp134Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app134/SpringDocApp134Test.java similarity index 79% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app134/SpringDocApp134Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app134/SpringDocApp134Test.java index 9cce102bc..54241d806 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app134/SpringDocApp134Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app134/SpringDocApp134Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,13 +18,12 @@ * * * * * * - * */ -package test.org.springdoc.api.app134; +package test.org.springdoc.api.v30.app134; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -38,7 +37,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp134Test extends AbstractSpringDocTest { +public class SpringDocApp134Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} @@ -48,7 +47,7 @@ public void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/v1-group")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app134-1.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app134-1.json"), true)); } @Test @@ -56,7 +55,7 @@ public void testApp2() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/v2-group")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app134-2.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app134-2.json"), true)); } @Test @@ -64,14 +63,14 @@ public void testApp3() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/v1-headers-group")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app134-3.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app134-3.json"), true)); } @Test public void testApp4() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/v1-v2-headers-group")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app134-4.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app134-4.json"), true)); } @Test @@ -79,6 +78,6 @@ public void testApp5() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/v2-consumes-group")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app134-5.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app134-5.json"), true)); } } diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app141/Book.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app135/Book.java similarity index 92% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app141/Book.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app135/Book.java index be0508a8e..3da7a9ba7 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app141/Book.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app135/Book.java @@ -1,9 +1,8 @@ /* - * * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -21,7 +20,7 @@ * */ -package test.org.springdoc.api.app141; +package test.org.springdoc.api.v30.app135; public class Book { diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app141/BookRepository.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app135/BookRepository.java similarity index 91% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app141/BookRepository.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app135/BookRepository.java index 0d5e342da..9536a95ad 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app141/BookRepository.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app135/BookRepository.java @@ -1,9 +1,8 @@ /* - * * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -21,7 +20,7 @@ * */ -package test.org.springdoc.api.app141; +package test.org.springdoc.api.v30.app135; import java.util.Arrays; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app135/BookRouter.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app135/BookRouter.java similarity index 89% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app135/BookRouter.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app135/BookRouter.java index df223a25d..36a49d3e4 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app135/BookRouter.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app135/BookRouter.java @@ -1,24 +1,26 @@ /* * * * - * * * Copyright 2019-2020 the original author or authors. * * * - * * * Licensed under the Apache License, Version 2.0 (the "License"); - * * * you may not use this file except in compliance with the License. - * * * You may obtain a copy of the License at + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. * * * - * * * https://www.apache.org/licenses/LICENSE-2.0 - * * * - * * * Unless required by applicable law or agreed to in writing, software - * * * distributed under the License is distributed on an "AS IS" BASIS, - * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * * See the License for the specific language governing permissions and - * * * limitations under the License. * * * */ -package test.org.springdoc.api.app135; +package test.org.springdoc.api.v30.app135; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app135/SpringDocApp135Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app135/SpringDocApp135Test.java similarity index 79% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app135/SpringDocApp135Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app135/SpringDocApp135Test.java index 561c8678f..59750065b 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app135/SpringDocApp135Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app135/SpringDocApp135Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,11 +18,10 @@ * * * * * * - * */ -package test.org.springdoc.api.app135; +package test.org.springdoc.api.v30.app135; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -30,7 +29,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp135Test extends AbstractSpringDocTest { +public class SpringDocApp135Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app136/OperationIdController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app136/OperationIdController.java similarity index 51% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app136/OperationIdController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app136/OperationIdController.java index 76f3d2ade..b3a149b52 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app136/OperationIdController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app136/OperationIdController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app136; +package test.org.springdoc.api.v30.app136; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app136/SpringDocApp136Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app136/SpringDocApp136Test.java similarity index 94% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app136/SpringDocApp136Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app136/SpringDocApp136Test.java index 8b08100f7..1c6e279a1 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app136/SpringDocApp136Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app136/SpringDocApp136Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,9 +18,8 @@ * * * * * * - * */ -package test.org.springdoc.api.app136; +package test.org.springdoc.api.v30.app136; import java.util.ArrayList; import java.util.Comparator; @@ -70,7 +69,7 @@ public void shouldGenerateOperationIdsDeterministically() throws Exception { HttpServletRequest request = mock(HttpServletRequest.class); when(request.getRequestURL()).thenReturn(new StringBuffer("http://localhost")); - String expected = getContent("results/app136.json"); + String expected = getContent("results/3.0.1/app136.json"); String openApi = resource.openapiJson(request, "", Locale.getDefault()); assertEquals(expected, openApi, true); } diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app137/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app137/HelloController.java new file mode 100644 index 000000000..2348c052a --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app137/HelloController.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app137; + +import io.swagger.v3.oas.annotations.security.SecurityRequirement; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@SecurityRequirement(name = "security_auth") +public class HelloController { + + @GetMapping("/test") + public void test(String hello) { + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app137/OpenApiConfig.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app137/OpenApiConfig.java similarity index 52% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app137/OpenApiConfig.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app137/OpenApiConfig.java index 7d5681ffe..8d6a2c05e 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app137/OpenApiConfig.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app137/OpenApiConfig.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app137; +package test.org.springdoc.api.v30.app137; import io.swagger.v3.oas.annotations.OpenAPIDefinition; import io.swagger.v3.oas.annotations.enums.SecuritySchemeType; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app137/SpringDocApp137Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app137/SpringDocApp137Test.java similarity index 81% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app137/SpringDocApp137Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app137/SpringDocApp137Test.java index f2f3d6c9f..0a2c49483 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app137/SpringDocApp137Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app137/SpringDocApp137Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,11 +18,10 @@ * * * * * * - * */ -package test.org.springdoc.api.app137; +package test.org.springdoc.api.v30.app137; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.test.context.TestPropertySource; @@ -32,7 +31,7 @@ * Tests Spring meta-annotations as method parameters */ @TestPropertySource(properties = {"test.server=http://test.toto.com", "test.desc=toto desc"}) -public class SpringDocApp137Test extends AbstractSpringDocTest { +public class SpringDocApp137Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app138/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app138/HelloController.java new file mode 100644 index 000000000..45492da47 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app138/HelloController.java @@ -0,0 +1,38 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app138; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping("/testB") + public void testB(String hello) { + } + + @GetMapping("/testA") + public void testA(String hello) { + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app138/SpringDocApp138Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app138/SpringDocApp138Test.java similarity index 82% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app138/SpringDocApp138Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app138/SpringDocApp138Test.java index b9ae2d474..e00b4a243 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app138/SpringDocApp138Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app138/SpringDocApp138Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,9 +18,8 @@ * * * * * * - * */ -package test.org.springdoc.api.app138; +package test.org.springdoc.api.v30.app138; import java.lang.reflect.Field; import java.util.HashMap; @@ -28,7 +27,6 @@ import java.util.Map; import com.fasterxml.jackson.databind.ObjectMapper; -import io.swagger.v3.core.util.Json; import io.swagger.v3.core.util.ObjectMapperFactory; import io.swagger.v3.oas.models.OpenAPI; import org.apache.commons.lang3.reflect.FieldUtils; @@ -36,8 +34,10 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocTest; +import org.springdoc.core.providers.ObjectMapperProvider; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; import org.springframework.test.context.TestPropertySource; @@ -53,13 +53,16 @@ * Tests Spring meta-annotations as method parameters */ @TestPropertySource(properties = "springdoc.writer-with-order-by-keys=true") -public class SpringDocApp138Test extends AbstractSpringDocTest { +public class SpringDocApp138Test extends AbstractSpringDocV30Test { + + @Autowired + ObjectMapperProvider objectMapperProvider; @BeforeEach void init() throws IllegalAccessException { - Field conField = FieldUtils.getDeclaredField(Json.class, "mapper", true); + Field conField = FieldUtils.getDeclaredField(ObjectMapperProvider.class, "jsonMapper", true); ObjectMapper mapper = SpringDocObjectMapperFactory.createJson(); - conField.set(mapper, mapper); + conField.set(objectMapperProvider, mapper); } private static class SpringDocObjectMapperFactory extends ObjectMapperFactory { @@ -93,7 +96,7 @@ public void testApp() throws Exception { MvcResult mockMvcResult = mockMvc.perform(MockMvcRequestBuilders.get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))).andReturn(); String result = mockMvcResult.getResponse().getContentAsString(); - String expected = getContent("results/app138.json"); + String expected = getContent("results/3.0.1/app138.json"); Assertions.assertEquals(expected, result); } diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app139/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app139/HelloController.java new file mode 100644 index 000000000..07d218e8f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app139/HelloController.java @@ -0,0 +1,43 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app139; + +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping(produces = MediaType.TEXT_PLAIN_VALUE, path = "/test1") + public String echo1(@RequestParam(name = "${test.name}", defaultValue = "${test.default-value}") String text) { + return text; + } + + @GetMapping(produces = MediaType.TEXT_PLAIN_VALUE, path = "/test2") + public String echo2(@RequestParam(value = "${test.value}", defaultValue = "${test.default-value}") String text) { + return text; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app139/SpringDocApp139Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app139/SpringDocApp139Test.java similarity index 82% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app139/SpringDocApp139Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app139/SpringDocApp139Test.java index 27b0ce68f..242f34a9b 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app139/SpringDocApp139Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app139/SpringDocApp139Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,11 +18,10 @@ * * * * * * - * */ -package test.org.springdoc.api.app139; +package test.org.springdoc.api.v30.app139; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.test.context.TestPropertySource; @@ -32,7 +31,7 @@ * Tests Spring meta-annotations as method parameters */ @TestPropertySource(properties = {"test.name=text","test.value=text","test.default-value=default-text"}) -public class SpringDocApp139Test extends AbstractSpringDocTest { +public class SpringDocApp139Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app14/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app14/HelloController.java new file mode 100644 index 000000000..a06f6fbdb --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app14/HelloController.java @@ -0,0 +1,48 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app14; + +import javax.validation.Valid; +import javax.validation.constraints.NotBlank; + +import io.swagger.v3.oas.annotations.tags.Tag; + +import org.springframework.http.HttpEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@Tag(name = "greeting", description = "test") +public class HelloController { + + @GetMapping("/persons") + public void persons(@Valid @NotBlank String name) { + + } + + @GetMapping("/test") + @Tag(name = "lang.change") + public HttpEntity demo2() { + return null; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app14/SpringDocApp14Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app14/SpringDocApp14Test.java new file mode 100644 index 000000000..0a5c35e14 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app14/SpringDocApp14Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app14; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp14Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app140/HelloApplication.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app140/HelloApplication.java similarity index 98% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app140/HelloApplication.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app140/HelloApplication.java index 6f300c7b3..4403ebbda 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app140/HelloApplication.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app140/HelloApplication.java @@ -1,9 +1,8 @@ /* - * * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -21,7 +20,7 @@ * */ -package test.org.springdoc.api.app140; +package test.org.springdoc.api.v30.app140; import java.io.IOException; import java.net.URI; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app140/SpringDocApp140Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app140/SpringDocApp140Test.java similarity index 78% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app140/SpringDocApp140Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app140/SpringDocApp140Test.java index 38fac1290..a29da2e30 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app140/SpringDocApp140Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app140/SpringDocApp140Test.java @@ -1,9 +1,8 @@ /* - * * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -21,14 +20,14 @@ * */ -package test.org.springdoc.api.app140; +package test.org.springdoc.api.v30.app140; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; -public class SpringDocApp140Test extends AbstractSpringDocTest { +public class SpringDocApp140Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app141/Book.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app141/Book.java new file mode 100644 index 000000000..104ffd379 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app141/Book.java @@ -0,0 +1,60 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app141; + +public class Book { + + private String id; + private String title; + private String author; + + public Book(String id, String title, String author) { + this.id = id; + this.title = title; + this.author = author; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getAuthor() { + return author; + } + + public void setAuthor(String author) { + this.author = author; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app141/BookRepository.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app141/BookRepository.java new file mode 100644 index 000000000..93eed28a4 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app141/BookRepository.java @@ -0,0 +1,41 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app141; + +import java.util.Arrays; +import java.util.List; + +import org.springframework.stereotype.Component; + +@Component +public class BookRepository { + + List findByAuthor(String author){ + Book[] books = {new Book("1", "title1","author1")}; + return Arrays.asList(books); + } + + List findAll() { + Book[] books = {new Book("2", "title2","author2")}; + return Arrays.asList(books); } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app141/BookRouter.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app141/BookRouter.java similarity index 97% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app141/BookRouter.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app141/BookRouter.java index 3a0e78c9c..3026b0dd8 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app141/BookRouter.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app141/BookRouter.java @@ -1,9 +1,8 @@ /* - * * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -21,7 +20,7 @@ * */ -package test.org.springdoc.api.app141; +package test.org.springdoc.api.v30.app141; import io.swagger.v3.oas.annotations.enums.ParameterIn; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app141/SpringDocApp141Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app141/SpringDocApp141Test.java similarity index 79% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app141/SpringDocApp141Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app141/SpringDocApp141Test.java index 8c2f4d002..9515e7bff 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app141/SpringDocApp141Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app141/SpringDocApp141Test.java @@ -1,9 +1,8 @@ /* - * * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -20,9 +19,9 @@ * * * */ -package test.org.springdoc.api.app141; +package test.org.springdoc.api.v30.app141; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -30,7 +29,7 @@ /** * Tests Spring meta-annotations as method parameters */ -public class SpringDocApp141Test extends AbstractSpringDocTest { +public class SpringDocApp141Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app142/HelloApplication.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app142/HelloApplication.java similarity index 97% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app142/HelloApplication.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app142/HelloApplication.java index 3fe3ff7e5..75a3b004d 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app142/HelloApplication.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app142/HelloApplication.java @@ -1,9 +1,8 @@ /* - * * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -21,7 +20,7 @@ * */ -package test.org.springdoc.api.app142; +package test.org.springdoc.api.v30.app142; import java.io.IOException; import java.net.URI; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app142/SpringDocApp142Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app142/SpringDocApp142Test.java similarity index 78% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app142/SpringDocApp142Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app142/SpringDocApp142Test.java index 51367b1c4..08e7aa335 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app142/SpringDocApp142Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app142/SpringDocApp142Test.java @@ -1,9 +1,8 @@ /* - * * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -21,14 +20,14 @@ * */ -package test.org.springdoc.api.app142; +package test.org.springdoc.api.v30.app142; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; -public class SpringDocApp142Test extends AbstractSpringDocTest { +public class SpringDocApp142Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app143/HelloHiddenController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app143/HelloHiddenController.java new file mode 100644 index 000000000..46edbf89f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app143/HelloHiddenController.java @@ -0,0 +1,41 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app143; + +import io.swagger.v3.oas.annotations.Hidden; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@Hidden +public class HelloHiddenController { + + @GetMapping("/testA") + public void testA(String hello) { + } + + @GetMapping("/testB") + public void testB(String hello) { + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app143/SpringDocApp143Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app143/SpringDocApp143Test.java new file mode 100644 index 000000000..f66c6799d --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app143/SpringDocApp143Test.java @@ -0,0 +1,42 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app143; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; + +/** + * Test issue 907 fix. + * Hidden controller showing up in swagger UI when springdoc.show-actuator is enabled + */ +@TestPropertySource(properties = {"management.endpoints.enabled-by-default=true", + "springdoc.show-actuator=true", "management.endpoints.web.exposure.exclude=functions" +}) +public class SpringDocApp143Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app144/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app144/HelloController.java new file mode 100644 index 000000000..35903c5f1 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app144/HelloController.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app144; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping("/persons") + public String persons() { + return "OK"; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app144/SpringDocApp144Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app144/SpringDocApp144Test.java similarity index 58% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app144/SpringDocApp144Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app144/SpringDocApp144Test.java index 060a39f81..1f9b93b65 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app144/SpringDocApp144Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app144/SpringDocApp144Test.java @@ -1,26 +1,30 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app144; +package test.org.springdoc.api.v30.app144; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocActuatorTest; +import test.org.springdoc.api.v30.AbstractSpringDocActuatorV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.test.context.SpringBootTest; @@ -37,7 +41,7 @@ "springdoc.use-management-port=true", "management.server.port=9090", "management.endpoints.web.base-path=/application" }) -public class SpringDocApp144Test extends AbstractSpringDocActuatorTest { +public class SpringDocApp144Test extends AbstractSpringDocActuatorV30Test { @SpringBootApplication static class SpringDocTestApp {} @@ -51,7 +55,7 @@ public void testApp() throws Exception { @Test public void testApp1() throws Exception { String result = actuatorRestTemplate.getForObject("/application/openapi", String.class); - String expected = getContent("results/app144.json"); + String expected = getContent("results/3.0.1/app144.json"); assertEquals(expected, result, true); } diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app145/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app145/HelloController.java new file mode 100644 index 000000000..bab41fc9d --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app145/HelloController.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app145; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping("/persons") + public String persons() { + return "OK"; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app145/SpringDocApp145Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app145/SpringDocApp145Test.java similarity index 71% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app145/SpringDocApp145Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app145/SpringDocApp145Test.java index 837edc153..ea8001f88 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app145/SpringDocApp145Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app145/SpringDocApp145Test.java @@ -1,26 +1,30 @@ /* * - * * Copyright 2019-2022 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app145; +package test.org.springdoc.api.v30.app145; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocActuatorTest; +import test.org.springdoc.api.v30.AbstractSpringDocActuatorV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.test.context.SpringBootTest; @@ -41,10 +45,10 @@ "server.port=55556", "springdoc.use-management-port=true", "springdoc.group-configs[0].group=users", - "springdoc.group-configs[0].packages-to-scan=test.org.springdoc.api.app145", + "springdoc.group-configs[0].packages-to-scan=test.org.springdoc.api.v30.app145", "management.server.port=9091", "management.endpoints.web.base-path=/application" }) -public class SpringDocApp145Test extends AbstractSpringDocActuatorTest { +public class SpringDocApp145Test extends AbstractSpringDocActuatorV30Test { @SpringBootApplication static class SpringDocTestApp {} @@ -72,7 +76,7 @@ public void testApp1() throws Exception { @Test public void testApp2() throws Exception { String result = actuatorRestTemplate.getForObject("/application/openapi/users", String.class); - String expected = getContent("results/app145.json"); + String expected = getContent("results/3.0.1/app145.json"); assertEquals(expected, result, true); } diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app146/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app146/HelloController.java new file mode 100644 index 000000000..c03f7ce52 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app146/HelloController.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app146; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping("/persons") + public String persons() { + return "OK"; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app146/SpringDocApp146Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app146/SpringDocApp146Test.java similarity index 61% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app146/SpringDocApp146Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app146/SpringDocApp146Test.java index e8c5e3e9e..1d6073c30 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app146/SpringDocApp146Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app146/SpringDocApp146Test.java @@ -1,26 +1,30 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app146; +package test.org.springdoc.api.v30.app146; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocActuatorTest; +import test.org.springdoc.api.v30.AbstractSpringDocActuatorV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.test.context.SpringBootTest; @@ -40,7 +44,7 @@ "server.servlet.context-path=/sample", "management.server.base-path=/test", "management.endpoints.web.base-path=/application" }) -public class SpringDocApp146Test extends AbstractSpringDocActuatorTest { +public class SpringDocApp146Test extends AbstractSpringDocActuatorV30Test { @SpringBootApplication static class SpringDocTestApp {} @@ -51,7 +55,7 @@ public void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/"+Constants.ACTUATOR_DEFAULT_GROUP)) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app146-1.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app146-1.json"), true)); } @Test @@ -59,7 +63,7 @@ public void testApp1() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/"+Constants.DEFAULT_GROUP_NAME)) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app146-2.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app146-2.json"), true)); } } diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app147/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app147/HelloController.java new file mode 100644 index 000000000..f780a2ae8 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app147/HelloController.java @@ -0,0 +1,47 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app147; + +import org.springdoc.core.GroupedOpenApi; + +import org.springframework.context.annotation.Bean; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping("/persons") + public String persons() { + return "OK"; + } + + @Bean + public GroupedOpenApi userOpenApi() { + return GroupedOpenApi.builder() + .group("users") + .packagesToScan("test.org.springdoc.api.v30.app147") + .build(); + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app147/SpringDocApp147Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app147/SpringDocApp147Test.java similarity index 63% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app147/SpringDocApp147Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app147/SpringDocApp147Test.java index 9a574cb27..a834ba4ff 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app147/SpringDocApp147Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app147/SpringDocApp147Test.java @@ -1,26 +1,30 @@ /* * - * * Copyright 2019-2022 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app147; +package test.org.springdoc.api.v30.app147; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocActuatorTest; +import test.org.springdoc.api.v30.AbstractSpringDocActuatorV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.test.context.SpringBootTest; @@ -40,7 +44,7 @@ "server.servlet.context-path=/sample", "management.server.base-path=/test", "management.endpoints.web.base-path=/application" }) -public class SpringDocApp147Test extends AbstractSpringDocActuatorTest { +public class SpringDocApp147Test extends AbstractSpringDocActuatorV30Test { @SpringBootApplication static class SpringDocTestApp {} @@ -50,7 +54,7 @@ public void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/"+Constants.ACTUATOR_DEFAULT_GROUP)) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app147-1.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app147-1.json"), true)); } @Test @@ -58,7 +62,7 @@ public void testApp1() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/users")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app147-2.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app147-2.json"), true)); } @Test diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app148/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app148/HelloController.java new file mode 100644 index 000000000..a98b2722c --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app148/HelloController.java @@ -0,0 +1,47 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app148; + +import org.springdoc.core.GroupedOpenApi; + +import org.springframework.context.annotation.Bean; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping("/persons") + public String persons() { + return "OK"; + } + + @Bean + public GroupedOpenApi userOpenApi() { + return GroupedOpenApi.builder() + .group("users") + .packagesToScan("test.org.springdoc.api.v30.app148") + .build(); + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app148/SpringDocApp148Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app148/SpringDocApp148Test.java similarity index 67% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app148/SpringDocApp148Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app148/SpringDocApp148Test.java index af4fdcfdd..e31cc212b 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app148/SpringDocApp148Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app148/SpringDocApp148Test.java @@ -1,26 +1,30 @@ /* * - * * Copyright 2019-2022 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app148; +package test.org.springdoc.api.v30.app148; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocActuatorTest; +import test.org.springdoc.api.v30.AbstractSpringDocActuatorV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.test.context.SpringBootTest; @@ -44,7 +48,7 @@ "management.endpoints.web.exposure.exclude=functions, shutdown", "management.server.base-path=/test", "management.endpoints.web.base-path=/application" }) -public class SpringDocApp148Test extends AbstractSpringDocActuatorTest { +public class SpringDocApp148Test extends AbstractSpringDocActuatorV30Test { @SpringBootApplication static class SpringDocTestApp {} @@ -53,14 +57,14 @@ static class SpringDocTestApp {} @Test public void testApp() throws Exception { String result = actuatorRestTemplate.getForObject("/test/application/openapi/users", String.class); - String expected = getContent("results/app148-1.json"); + String expected = getContent("results/3.0.1/app148-1.json"); assertEquals(expected, result, true); } @Test public void testApp2() throws Exception { String result = actuatorRestTemplate.getForObject("/test/application/openapi/x-actuator", String.class); - String expected = getContent("results/app148-2.json"); + String expected = getContent("results/3.0.1/app148-2.json"); assertEquals(expected, result, true); } diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app149/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app149/HelloController.java similarity index 63% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app149/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app149/HelloController.java index a30d5c2b1..43f813747 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app149/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app149/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app149; +package test.org.springdoc.api.v30.app149; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app149/HelloMessage.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app149/HelloMessage.java new file mode 100644 index 000000000..c00621438 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app149/HelloMessage.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app149; + +public class HelloMessage { + public String text; + public int number; + + public HelloMessage(String text, int number) { + this.text = text; + this.number = number; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app149/HiddenHelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app149/HiddenHelloController.java new file mode 100644 index 000000000..e336de6b6 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app149/HiddenHelloController.java @@ -0,0 +1,44 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app149; + +import io.swagger.v3.oas.annotations.Operation; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author bnasslahsen + */ +@RestController +@RequestMapping("/api") +public class HiddenHelloController { + + @Operation(description = "I want here some custom config") + @GetMapping("/{entity}/{id}") + public ResponseEntity getEntity() { + throw new UnsupportedOperationException("the body is not relevant now"); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app149/SpringDocApp149Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app149/SpringDocApp149Test.java new file mode 100644 index 000000000..88009c560 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app149/SpringDocApp149Test.java @@ -0,0 +1,42 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app149; + +import org.junit.jupiter.api.BeforeAll; +import org.springdoc.core.SpringDocUtils; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; + +@TestPropertySource(properties = "springdoc.model-and-view-allowed=true") +public class SpringDocApp149Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + + @BeforeAll + public static void init() { + SpringDocUtils.getConfig().addHiddenRestControllers(HiddenHelloController.class); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app15/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app15/HelloController.java new file mode 100644 index 000000000..4cd59ca21 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app15/HelloController.java @@ -0,0 +1,43 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app15; + +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 org.json.JSONObject; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping(value = "/persons") + @Operation(description = "${springdoc.operation-descriptions.myOperation}", responses = @ApiResponse(responseCode = "200", content = @Content(schema = @Schema(hidden = true)))) + public JSONObject persons() { + return new JSONObject(); + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app15/SpringDocApp15Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app15/SpringDocApp15Test.java similarity index 65% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app15/SpringDocApp15Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app15/SpringDocApp15Test.java index ec449121b..4bd871db1 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app15/SpringDocApp15Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app15/SpringDocApp15Test.java @@ -1,28 +1,32 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app15; +package test.org.springdoc.api.v30.app15; 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 test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.test.context.TestPropertySource; @@ -39,7 +43,7 @@ "springdoc.openapidefinition.info.contact.email=My contact email", "springdoc.openapidefinition.info.contact.url=My contact url" }) -public class SpringDocApp15Test extends AbstractSpringDocTest { +public class SpringDocApp15Test extends AbstractSpringDocV30Test { @SpringBootApplication @OpenAPIDefinition(info = @Info( diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app150/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app150/HelloController.java similarity index 67% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app150/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app150/HelloController.java index 3a786c97b..edbdf76e0 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app150/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app150/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app150; +package test.org.springdoc.api.v30.app150; import java.time.LocalDate; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app150/SpringDocApp150Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app150/SpringDocApp150Test.java new file mode 100644 index 000000000..285edccff --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app150/SpringDocApp150Test.java @@ -0,0 +1,38 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app150; + + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * Tests Spring meta-annotations as method parameters + */ +public class SpringDocApp150Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app151/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app151/HelloController.java new file mode 100644 index 000000000..28622d47d --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app151/HelloController.java @@ -0,0 +1,41 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app151; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/test") +public class HelloController { + + @GetMapping("") + /** + * A test endpoint mounted under `/test` + * @return 0 + */ + public int test() { + return 0; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app151/SpringDocApp151Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app151/SpringDocApp151Test.java new file mode 100644 index 000000000..50e53a1d4 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app151/SpringDocApp151Test.java @@ -0,0 +1,38 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app151; + + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * Tests Spring meta-annotations as method parameters + */ +public class SpringDocApp151Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app152/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app152/HelloController.java new file mode 100644 index 000000000..25e1d6974 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app152/HelloController.java @@ -0,0 +1,52 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app152; + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import org.springframework.web.util.pattern.PathPatternParser; + +@RestController +@RequestMapping("/api") +public class HelloController { + + @GetMapping + public String helloWorld() { + return "ok"; + } + + @Configuration + public class WebConfig implements WebMvcConfigurer { + + @Override + public void configurePathMatch(PathMatchConfigurer configurer) { + configurer.setPatternParser(new PathPatternParser()); + } + + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app152/SpringDocApp152Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app152/SpringDocApp152Test.java new file mode 100644 index 000000000..563358ec6 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app152/SpringDocApp152Test.java @@ -0,0 +1,38 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app152; + + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * Tests Spring meta-annotations as method parameters + */ +public class SpringDocApp152Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app153/OrderState.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app153/OrderState.java new file mode 100644 index 000000000..6fd0bc28d --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app153/OrderState.java @@ -0,0 +1,42 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app153; + +import io.swagger.v3.oas.annotations.media.Schema; + + +@Schema(type="string", allowableValues={"finished", "new"}) +public enum OrderState { + FINISHED("finished"), + NEW("new"); + + OrderState(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + private final String value; +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app153/OrderStateMapper.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app153/OrderStateMapper.java new file mode 100644 index 000000000..a10b7251b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app153/OrderStateMapper.java @@ -0,0 +1,41 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app153; + +import java.beans.PropertyEditorSupport; +import java.util.Arrays; + +import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException; + +public class OrderStateMapper extends PropertyEditorSupport { + + @Override + public void setAsText(String text) { + setValue( + Arrays.stream(OrderState.class.getEnumConstants()) + .filter(e -> e.getValue().equals(text)) + .findFirst() + .orElseThrow(() -> new MethodArgumentTypeMismatchException( + text, OrderState.class, "orderState", null, null))); + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app153/SpringDocApp153Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app153/SpringDocApp153Test.java new file mode 100644 index 000000000..12cd3eb03 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app153/SpringDocApp153Test.java @@ -0,0 +1,38 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app153; + + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * Tests Spring meta-annotations as method parameters + */ +public class SpringDocApp153Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app153/TestController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app153/TestController.java new file mode 100644 index 000000000..f9cc2af9e --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app153/TestController.java @@ -0,0 +1,44 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app153; + +import org.springframework.web.bind.WebDataBinder; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.InitBinder; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@RestController +class TestController { + + @InitBinder + public void initBinder(WebDataBinder dataBinder) { + dataBinder.registerCustomEditor(OrderState.class, new OrderStateMapper()); + } + + @GetMapping(value = {"/orders"}) + public Object method( + @RequestParam(value = "state", defaultValue = "finished") OrderState orderState) { + return null; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app154/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app154/HelloController.java similarity index 52% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app154/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app154/HelloController.java index 19d568fcd..83adf4804 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app154/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app154/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app154; +package test.org.springdoc.api.v30.app154; import java.time.Instant; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app154/OpenApiConfiguration.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app154/OpenApiConfiguration.java similarity index 50% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app154/OpenApiConfiguration.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app154/OpenApiConfiguration.java index e4746a4eb..8673e36fa 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app154/OpenApiConfiguration.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app154/OpenApiConfiguration.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app154; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app154; import io.swagger.v3.oas.annotations.OpenAPIDefinition; import io.swagger.v3.oas.annotations.enums.SecuritySchemeType; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app154/SpringDocApp154Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app154/SpringDocApp154Test.java new file mode 100644 index 000000000..149d8426b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app154/SpringDocApp154Test.java @@ -0,0 +1,38 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app154; + + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * Tests Spring meta-annotations as method parameters + */ +public class SpringDocApp154Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/AbstractIntParameterObject.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/AbstractIntParameterObject.java new file mode 100644 index 000000000..d4af9325f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/AbstractIntParameterObject.java @@ -0,0 +1,46 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app155; + +public class AbstractIntParameterObject { + + int primitiveBaseField; + + T genericField; + + public int getPrimitiveBaseField() { + return primitiveBaseField; + } + + public void setPrimitiveBaseField(int primitiveBaseField) { + this.primitiveBaseField = primitiveBaseField; + } + + public T getGenericField() { + return genericField; + } + + public void setGenericField(T genericField) { + this.genericField = genericField; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/AbstractParameterObject.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/AbstractParameterObject.java new file mode 100644 index 000000000..186fd0fe5 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/AbstractParameterObject.java @@ -0,0 +1,50 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app155; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +public class AbstractParameterObject> { + + int primitiveBaseField; + + @Parameter(schema=@Schema(type = "string", allowableValues = {"ONE", "TWO"}) ) + T genericField; + + public int getPrimitiveBaseField() { + return primitiveBaseField; + } + + public void setPrimitiveBaseField(int primitiveBaseField) { + this.primitiveBaseField = primitiveBaseField; + } + + public T getGenericField() { + return genericField; + } + + public void setGenericField(T genericField) { + this.genericField = genericField; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/ConcreteEnum.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/ConcreteEnum.java new file mode 100644 index 000000000..bd2c3b51a --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/ConcreteEnum.java @@ -0,0 +1,31 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app155; + + + +enum ConcreteEnum { + ONE, + TWO + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/ConcreteIntParameterObject.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/ConcreteIntParameterObject.java new file mode 100644 index 000000000..9511dd27e --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/ConcreteIntParameterObject.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app155; + +public class ConcreteIntParameterObject extends AbstractIntParameterObject{ + + int primitiveConcreteField; + + public int getPrimitiveConcreteField() { + return primitiveConcreteField; + } + + public void setPrimitiveConcreteField(int primitiveConcreteField) { + this.primitiveConcreteField = primitiveConcreteField; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/ConcreteParameterObject.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/ConcreteParameterObject.java new file mode 100644 index 000000000..dfcce257b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/ConcreteParameterObject.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app155; + +public class ConcreteParameterObject extends AbstractParameterObject { + + int primitiveConcreteField; + + public int getPrimitiveConcreteField() { + return primitiveConcreteField; + } + + public void setPrimitiveConcreteField(int primitiveConcreteField) { + this.primitiveConcreteField = primitiveConcreteField; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/HelloController.java similarity index 51% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/HelloController.java index b71e346c2..47957ba64 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app155/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app155; +package test.org.springdoc.api.v30.app155; import org.springdoc.api.annotations.ParameterObject; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/SpringDocApp155Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/SpringDocApp155Test.java new file mode 100644 index 000000000..680c0cfdf --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app155/SpringDocApp155Test.java @@ -0,0 +1,38 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app155; + + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * Tests Spring meta-annotations as method parameters + */ +public class SpringDocApp155Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app156/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app156/HelloController.java similarity index 66% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app156/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app156/HelloController.java index f45b3640e..fbf19cccb 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app156/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app156/HelloController.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app156; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app156; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.ArraySchema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app156/SomeEnum.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app156/SomeEnum.java new file mode 100644 index 000000000..f93851a63 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app156/SomeEnum.java @@ -0,0 +1,28 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app156; + +public enum SomeEnum { + FIRST, + SECOND +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app156/SpringDocApp156Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app156/SpringDocApp156Test.java new file mode 100644 index 000000000..ba06980c8 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app156/SpringDocApp156Test.java @@ -0,0 +1,38 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app156; + + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * Tests Spring meta-annotations as method parameters + */ +public class SpringDocApp156Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app156/User.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app156/User.java new file mode 100644 index 000000000..0c66fe0de --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app156/User.java @@ -0,0 +1,55 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app156; + +import java.util.Set; + +public class User { + private String someText; + private Set textSet; + private Set someEnums; + + public String getSomeText() { + return someText; + } + + public void setSomeText(String someText) { + this.someText = someText; + } + + public Set getTextSet() { + return textSet; + } + + public void setTextSet(Set textSet) { + this.textSet = textSet; + } + + public Set getSomeEnums() { + return someEnums; + } + + public void setSomeEnums(Set someEnums) { + this.someEnums = someEnums; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app157/Bar.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app157/Bar.java new file mode 100644 index 000000000..6cc9ffdf6 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app157/Bar.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app157; + +/** + * A class without a String in it + */ +public class Bar { + private Object child; + + public Object getChild() { + return this.child; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app157/Foo.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app157/Foo.java new file mode 100644 index 000000000..f1d49451a --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app157/Foo.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app157; + +/** + * A class with a String in it + */ +public class Foo { + private String child; + + public String getChild() { + return this.child; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app157/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app157/HelloController.java new file mode 100644 index 000000000..ace57b777 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app157/HelloController.java @@ -0,0 +1,48 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app157; + +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * Put Foo and Bar in the schema's components, make sure there is an ignored wrapper + * ({@code ResponseEntity}). + */ +@RestController +public class HelloController { + + @GetMapping( "/foo") + public ResponseEntity getFoo() { + return new ResponseEntity(HttpStatus.OK); + } + + @GetMapping( "/bar") + public ResponseEntity getBar() { + return new ResponseEntity(HttpStatus.OK); + } + + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app157/SpringDocApp157Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app157/SpringDocApp157Test.java similarity index 58% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app157/SpringDocApp157Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app157/SpringDocApp157Test.java index bb2571f12..cf43e8a0a 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app157/SpringDocApp157Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app157/SpringDocApp157Test.java @@ -1,14 +1,36 @@ -package test.org.springdoc.api.app157; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app157; import java.util.ArrayList; import io.swagger.v3.core.converter.ModelConverters; import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.SpringBootApplication; import static org.hamcrest.Matchers.hasProperty; @@ -23,23 +45,19 @@ * the type is enclosed in an ignored wrapper. We test this by setting up a model converter which * adds "stringy" to the "required" property of a schema's parent, when the sub schema is a String. */ -public class SpringDocApp157Test extends AbstractSpringDocTest { +public class SpringDocApp157Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringBootApp {} - private StringyConverter myConverter = new StringyConverter(); + @Autowired + private StringyConverter stringyConverter; private ModelConverters converters = ModelConverters.getInstance(); - @BeforeEach - public void registerConverter() { - converters.addConverter(myConverter); - } - @AfterEach public void unregisterConverter() { - converters.removeConverter(myConverter); + converters.removeConverter(stringyConverter); } @Test diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app157/StringyConverter.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app157/StringyConverter.java new file mode 100644 index 000000000..700435400 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app157/StringyConverter.java @@ -0,0 +1,59 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app157; + +import java.util.Iterator; + +import com.fasterxml.jackson.databind.JavaType; +import io.swagger.v3.core.converter.AnnotatedType; +import io.swagger.v3.core.converter.ModelConverter; +import io.swagger.v3.core.converter.ModelConverterContext; +import io.swagger.v3.oas.models.media.Schema; +import org.springdoc.core.providers.ObjectMapperProvider; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +@Component +public class StringyConverter implements ModelConverter { + + @Autowired + ObjectMapperProvider objectMapperProvider; + + public StringyConverter(ObjectMapperProvider objectMapperProvider) { + this.objectMapperProvider = objectMapperProvider; + } + + + @Override + public Schema resolve(AnnotatedType type, ModelConverterContext context, + Iterator chain) { + + JavaType javaType = objectMapperProvider.jsonMapper().constructType(type.getType()); + + if (javaType.getRawClass().equals(String.class)) { + type.getParent().addRequiredItem("stringy"); + } + return chain.next().resolve(type, context, chain); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/CommonFooErrorHandler.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/CommonFooErrorHandler.java new file mode 100644 index 000000000..d11ba1632 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/CommonFooErrorHandler.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app158; + +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.ResponseStatus; + +public class CommonFooErrorHandler { + + @ExceptionHandler + @ResponseStatus(HttpStatus.CONFLICT) + public ErrorDTO onException(Exception e) { + return new ErrorDTO("Something wrong has happened"); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/ErrorDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/ErrorDTO.java new file mode 100644 index 000000000..6249bf1ca --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/ErrorDTO.java @@ -0,0 +1,42 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app158; + +public class ErrorDTO { + private String message; + + public ErrorDTO() { + } + + public ErrorDTO(String message) { + this.message = message; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/HelloController.java new file mode 100644 index 000000000..438e03c00 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/HelloController.java @@ -0,0 +1,42 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app158; + +import io.swagger.v3.oas.annotations.OpenAPIDefinition; +import io.swagger.v3.oas.annotations.info.Info; +import io.swagger.v3.oas.annotations.tags.Tag; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/api") +@OpenAPIDefinition(info = @Info(title = "API Examples", version = "1.0"), tags = @Tag(name = "Operations")) +public class HelloController { + + @GetMapping("/foo") + public SimpleDTO hello() { + return new SimpleDTO("foo"); + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/SimpleDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/SimpleDTO.java new file mode 100644 index 000000000..5e0b56f73 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/SimpleDTO.java @@ -0,0 +1,44 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app158; + +public class SimpleDTO { + + private String payload; + + public SimpleDTO() { + } + + public SimpleDTO(String payload) { + this.payload = payload; + } + + public String getPayload() { + return payload; + } + + public void setPayload(String payload) { + this.payload = payload; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/SpecificFooErrorHandler.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/SpecificFooErrorHandler.java new file mode 100644 index 000000000..53a72e553 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/SpecificFooErrorHandler.java @@ -0,0 +1,29 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app158; + +import org.springframework.web.bind.annotation.ControllerAdvice; + +@ControllerAdvice(assignableTypes = HelloController.class) +public class SpecificFooErrorHandler extends CommonFooErrorHandler { +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/SpringDocApp158Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/SpringDocApp158Test.java new file mode 100644 index 000000000..a4d1e87e4 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app158/SpringDocApp158Test.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app158; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp158Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/CustomException.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/CustomException.java new file mode 100644 index 000000000..bf5fe1329 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/CustomException.java @@ -0,0 +1,29 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app159; + +public class CustomException extends RuntimeException{ + public CustomException(String message) { + super(message); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/FooBean.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/FooBean.java new file mode 100644 index 000000000..c771fb284 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/FooBean.java @@ -0,0 +1,53 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app159; + +import com.fasterxml.jackson.annotation.JsonView; + +public class FooBean { + @JsonView(Views.View2.class) + private String message; + @JsonView(Views.View1.class) + private int code; + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public FooBean(String message, int code) { + this.message = message; + this.code = code; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/FooErrorHandler.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/FooErrorHandler.java similarity index 54% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/FooErrorHandler.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/FooErrorHandler.java index 6b39b9baf..ecd079e90 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app159/FooErrorHandler.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/FooErrorHandler.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app159; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app159; import com.fasterxml.jackson.annotation.JsonView; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/HelloController.java new file mode 100644 index 000000000..5ed7e5da7 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/HelloController.java @@ -0,0 +1,44 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app159; + +import io.swagger.v3.oas.annotations.OpenAPIDefinition; +import io.swagger.v3.oas.annotations.info.Info; +import io.swagger.v3.oas.annotations.tags.Tag; + +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/api") +@OpenAPIDefinition(info = @Info(title = "API Examples", version = "1.0"), tags = @Tag(name = "Operations")) +public class HelloController { + + @PostMapping("/foo") + public String create(@RequestBody String foo) { + return "foo"; + } +} + diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/SpringDocApp159Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/SpringDocApp159Test.java new file mode 100644 index 000000000..599361363 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/SpringDocApp159Test.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app159; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp159Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/Views.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/Views.java new file mode 100644 index 000000000..d70a7c963 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app159/Views.java @@ -0,0 +1,30 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app159; + +public class Views { + public static class View1 { + } + public static class View2 extends View1 { + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app16/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app16/HelloController.java new file mode 100644 index 000000000..4f57ea5dc --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app16/HelloController.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app16; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping("/persons") + public String persons() { + return "OK"; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app16/SpringDocApp16Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app16/SpringDocApp16Test.java new file mode 100644 index 000000000..91f4cf5ec --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app16/SpringDocApp16Test.java @@ -0,0 +1,46 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app16; + +import org.junit.jupiter.api.Test; +import org.springdoc.core.Constants; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.SpringBootConfiguration; +import org.springframework.test.context.TestPropertySource; + +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +@TestPropertySource(properties = "springdoc.api-docs.enabled=false") +public class SpringDocApp16Test extends AbstractSpringDocV30Test { + + @Test + public void testApp() throws Exception { + mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)) + .andExpect(status().isNotFound()); + } + + @SpringBootConfiguration + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app160/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app160/HelloController.java similarity index 65% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app160/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app160/HelloController.java index 1555fa75f..ee81a9ffe 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app160/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app160/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app160; +package test.org.springdoc.api.v30.app160; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app160/SpringDocApp160Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app160/SpringDocApp160Test.java new file mode 100644 index 000000000..dffdf96b9 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app160/SpringDocApp160Test.java @@ -0,0 +1,53 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app160; + +import org.junit.jupiter.api.Test; +import org.springdoc.core.Constants; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; + +import static org.hamcrest.Matchers.is; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +@TestPropertySource(properties = "springdoc.api-docs.resolve-schema-properties=true") +public class SpringDocApp160Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp { + } + + + @Test + public void testApp2() throws Exception { + mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/test")) + .andExpect(status().isOk()) + .andExpect(jsonPath("$.openapi", is("3.0.1"))) + .andExpect(content().json(getContent("results/3.0.1/app160-1.json"), true)); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app161/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app161/HelloController.java similarity index 63% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app161/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app161/HelloController.java index 98bc5083f..f80b4a895 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app161/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app161/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app161; +package test.org.springdoc.api.v30.app161; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app161/SpringDocApp161Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app161/SpringDocApp161Test.java new file mode 100644 index 000000000..b9428e544 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app161/SpringDocApp161Test.java @@ -0,0 +1,43 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app161; + +import java.util.Locale; + +import org.junit.jupiter.api.Test; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp161Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + + @Test + public void testApp() throws Exception { + Locale.setDefault(Locale.US); + super.testApp(); + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app162/OpenApiConfig.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app162/OpenApiConfig.java new file mode 100644 index 000000000..ef286ba1b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app162/OpenApiConfig.java @@ -0,0 +1,46 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app162; + +import java.util.ArrayList; +import java.util.List; + +import io.swagger.v3.oas.models.servers.Server; +import org.springdoc.core.customizers.OpenApiCustomiser; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class OpenApiConfig { + @Bean + OpenApiCustomiser openApiCustomiser() { + return openApi -> { + openApi.getInfo().version("v1"); + Server server = new Server().url(""); + List servers=new ArrayList<>(); + servers.add(server); + openApi.servers(servers); + }; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app162/SpringDocApp162Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app162/SpringDocApp162Test.java new file mode 100644 index 000000000..8459ca152 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app162/SpringDocApp162Test.java @@ -0,0 +1,40 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app162; + +import org.junit.jupiter.api.Test; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp162Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + + @Test + public void testApp2() throws Exception { + super.testApp(); + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app163/CommissionDto.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app163/CommissionDto.java similarity index 50% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app163/CommissionDto.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app163/CommissionDto.java index 0e4fa9feb..0d886abaa 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app163/CommissionDto.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app163/CommissionDto.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app163; +package test.org.springdoc.api.v30.app163; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app163/CommissionsResource.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app163/CommissionsResource.java similarity index 59% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app163/CommissionsResource.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app163/CommissionsResource.java index 73f8495f6..7ed081323 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app163/CommissionsResource.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app163/CommissionsResource.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2021 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app163; +package test.org.springdoc.api.v30.app163; import javax.validation.Valid; @@ -35,18 +39,16 @@ import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; import static org.springframework.http.ResponseEntity.accepted; -import static test.org.springdoc.api.app163.Examples.PUT_COMMISSION_REQUEST_BODY_EXAMPLE_KEY; -import static test.org.springdoc.api.app163.Examples.PUT_COMMISSION_RESPONSE_BODY_EXAMPLE_KEY; @RestController public class CommissionsResource { @PutMapping(value = "{id}", consumes = APPLICATION_JSON_VALUE) @Operation(description = "updateCommission", summary = "Update a commission") - @ApiResponse(responseCode = "202", description = "Commission updated", content = @Content(schema = @Schema(implementation = CommissionDto.class), examples = @ExampleObject(name = "202", ref = PUT_COMMISSION_RESPONSE_BODY_EXAMPLE_KEY))) + @ApiResponse(responseCode = "202", description = "Commission updated", content = @Content(schema = @Schema(implementation = CommissionDto.class), examples = @ExampleObject(name = "202", ref = Examples.PUT_COMMISSION_RESPONSE_BODY_EXAMPLE_KEY))) public ResponseEntity updateCommission( @Parameter(description = "Commission's id", required = true) @PathVariable("id") String commissionId, - @io.swagger.v3.oas.annotations.parameters.RequestBody(description = "A commission to update", required = true, content = @Content(schema = @Schema(implementation = CommissionDto.class), examples = @ExampleObject(name="requestExample", ref = PUT_COMMISSION_REQUEST_BODY_EXAMPLE_KEY))) @RequestBody(required = true) @Valid CommissionDto commission) { + @io.swagger.v3.oas.annotations.parameters.RequestBody(description = "A commission to update", required = true, content = @Content(schema = @Schema(implementation = CommissionDto.class), examples = @ExampleObject(name="requestExample", ref = Examples.PUT_COMMISSION_REQUEST_BODY_EXAMPLE_KEY))) @RequestBody(required = true) @Valid CommissionDto commission) { return accepted().body(commission); } diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app163/ExampleRegistrationCustomizer.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app163/ExampleRegistrationCustomizer.java new file mode 100644 index 000000000..0f8ca3b53 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app163/ExampleRegistrationCustomizer.java @@ -0,0 +1,47 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app163; + +import java.util.List; +import java.util.Map; + +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.examples.Example; +import org.springdoc.core.customizers.OpenApiCustomiser; + +import org.springframework.stereotype.Component; + +@Component +public class ExampleRegistrationCustomizer implements OpenApiCustomiser { + + private final List> examplesToRegister; + + public ExampleRegistrationCustomizer(List> examplesToRegister) { + this.examplesToRegister = examplesToRegister; + } + + @Override + public void customise(OpenAPI openApi) { + examplesToRegister.forEach(entry -> openApi.getComponents().addExamples(entry.getKey(), entry.getValue())); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app163/Examples.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app163/Examples.java similarity index 75% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app163/Examples.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app163/Examples.java index 356f8e822..68b034e65 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app163/Examples.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app163/Examples.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app163; +package test.org.springdoc.api.v30.app163; import java.util.AbstractMap; import java.util.Map; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app163/SpringDocApp163Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app163/SpringDocApp163Test.java new file mode 100644 index 000000000..5313a576c --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app163/SpringDocApp163Test.java @@ -0,0 +1,38 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app163; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Import; + +public class SpringDocApp163Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + @Import({ Examples.class, ExampleRegistrationCustomizer.class }) + static class SpringDocTestApp { + + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app164/SampleResponseClass.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app164/SampleResponseClass.java similarity index 57% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app164/SampleResponseClass.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app164/SampleResponseClass.java index 988b850b0..ecc647772 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app164/SampleResponseClass.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app164/SampleResponseClass.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app164; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app164; public class SampleResponseClass { diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app164/SpringDocApp164Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app164/SpringDocApp164Test.java new file mode 100644 index 000000000..9361e8269 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app164/SpringDocApp164Test.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app164; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; + +@TestPropertySource(properties = "springdoc.api-docs.resolve-schema-properties=true") +public class SpringDocApp164Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp { + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app164/TestApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app164/TestApiController.java new file mode 100644 index 000000000..e2dddf6c2 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app164/TestApiController.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app164; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class TestApiController { + + @GetMapping(value = "/test") + public SampleResponseClass getInvoices() { + return null; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app165/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app165/HelloController.java similarity index 63% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app165/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app165/HelloController.java index 9ce34bada..f3c7cd009 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app165/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app165/HelloController.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app165; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app165; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app165/SpringDocApp165Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app165/SpringDocApp165Test.java new file mode 100644 index 000000000..bc1d0972d --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app165/SpringDocApp165Test.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app165; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp165Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app166/GlobalErrorResponseDto.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app166/GlobalErrorResponseDto.java new file mode 100644 index 000000000..8b17e79f8 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app166/GlobalErrorResponseDto.java @@ -0,0 +1,40 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app166; + +public class GlobalErrorResponseDto { + + private String globalMessage; + + public GlobalErrorResponseDto(String globalMessage) { + this.globalMessage = globalMessage; + } + + public String getGlobalMessage() { + return globalMessage; + } + + public void setGlobalMessage(String globalMessage) { + this.globalMessage = globalMessage; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app166/GlobalExceptionHandler.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app166/GlobalExceptionHandler.java new file mode 100644 index 000000000..fdf3a27cb --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app166/GlobalExceptionHandler.java @@ -0,0 +1,39 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app166; + +import org.springframework.stereotype.Component; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.RestControllerAdvice; + +@RestControllerAdvice +@Component("1") // bean name override to simulate order in HashMap +public class GlobalExceptionHandler { + + @ExceptionHandler(RuntimeException.class) + @ResponseStatus + public GlobalErrorResponseDto processException() { + return new GlobalErrorResponseDto("global"); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app166/LocalErrorResponseDto.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app166/LocalErrorResponseDto.java new file mode 100644 index 000000000..720ecabb6 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app166/LocalErrorResponseDto.java @@ -0,0 +1,40 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app166; + +public class LocalErrorResponseDto { + + private String localMessage; + + public LocalErrorResponseDto(String localMessage) { + this.localMessage = localMessage; + } + + public String getLocalMessage() { + return localMessage; + } + + public void setLocalMessage(String localMessage) { + this.localMessage = localMessage; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app166/SpringDocApp166Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app166/SpringDocApp166Test.java new file mode 100644 index 000000000..5d8ae0efa --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app166/SpringDocApp166Test.java @@ -0,0 +1,41 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app166; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; + +/** + * In this test, it is checked that the error handler is displayed correctly in the documentation. + * Exactly, that the local handler takes precedence over the global one + * */ +@TestPropertySource(properties = "springdoc.api-docs.resolve-schema-properties=true") +public class SpringDocApp166Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp { + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app166/TestApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app166/TestApiController.java new file mode 100644 index 000000000..509847528 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app166/TestApiController.java @@ -0,0 +1,45 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app166; + +import org.springframework.stereotype.Component; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@Component("0") // bean name override to simulate order in HashMap +public class TestApiController { + + @GetMapping(value = "/test") + public String throwError() { + throw new IllegalArgumentException(); + } + + @ExceptionHandler(RuntimeException.class) + @ResponseStatus + public LocalErrorResponseDto processException() { + return new LocalErrorResponseDto("local"); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app167/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app167/HelloController.java new file mode 100644 index 000000000..c3d1956b9 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app167/HelloController.java @@ -0,0 +1,45 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app167; + +import io.swagger.v3.oas.annotations.Parameter; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author bnasslahsen + */ +@RestController +@RequestMapping("/api") +public class HelloController { + + @GetMapping("/sample1") + public ResponseEntity sample1(@Parameter(name="mySample") String mySample) { + throw new UnsupportedOperationException("the body is not relevant now"); + } + + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app167/SpringDocApp167Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app167/SpringDocApp167Test.java new file mode 100644 index 000000000..292a97ec9 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app167/SpringDocApp167Test.java @@ -0,0 +1,38 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app167; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; + + +@TestPropertySource(properties = "springdoc.disable-i18n=true") +public class SpringDocApp167Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp { + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app118/AbstractParent.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app168/AbstractParent.java similarity index 56% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app118/AbstractParent.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app168/AbstractParent.java index 679f24ba4..b001eb6cb 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app118/AbstractParent.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app168/AbstractParent.java @@ -1,47 +1,69 @@ -package test.org.springdoc.api.app118; - -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonSubTypes.Type; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeInfo.Id; - -@JsonTypeInfo(use = Id.NAME, property = "type") -@JsonSubTypes({ - @Type(ChildOfAbstract1.class), - @Type(ChildOfAbstract2.class) -}) -public abstract class AbstractParent { - private int id; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } -} - -class ChildOfAbstract1 extends AbstractParent { - private String abstrachChild1Param; - - public String getAbstrachChild1Param() { - return abstrachChild1Param; - } - - public void setAbstrachChild1Param(String abstrachChild1Param) { - this.abstrachChild1Param = abstrachChild1Param; - } -} - -class ChildOfAbstract2 extends AbstractParent { - private String abstractChild2Param; - - public String getAbstractChild2Param() { - return abstractChild2Param; - } - - public void setAbstractChild2Param(String abstractChild2Param) { - this.abstractChild2Param = abstractChild2Param; - } -} +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app168; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonSubTypes.Type; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeInfo.Id; + +@JsonTypeInfo(use = Id.NAME, property = "type") +@JsonSubTypes({ + @Type(ChildOfAbstract1.class), + @Type(ChildOfAbstract2.class) +}) +public abstract class AbstractParent { + private int id; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } +} + +class ChildOfAbstract1 extends AbstractParent { + private String abstrachChild1Param; + + public String getAbstrachChild1Param() { + return abstrachChild1Param; + } + + public void setAbstrachChild1Param(String abstrachChild1Param) { + this.abstrachChild1Param = abstrachChild1Param; + } +} + +class ChildOfAbstract2 extends AbstractParent { + private String abstractChild2Param; + + public String getAbstractChild2Param() { + return abstractChild2Param; + } + + public void setAbstractChild2Param(String abstractChild2Param) { + this.abstractChild2Param = abstractChild2Param; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app168/ConcreteParent.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app168/ConcreteParent.java similarity index 56% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app168/ConcreteParent.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app168/ConcreteParent.java index cae8e083a..9df5f9f51 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app168/ConcreteParent.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app168/ConcreteParent.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app168; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app168; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonSubTypes.Type; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app168/Controller.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app168/Controller.java similarity index 56% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app168/Controller.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app168/Controller.java index c3a39fc6f..4037970a9 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app168/Controller.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app168/Controller.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app168; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app168; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app168/SpringDocApp168Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app168/SpringDocApp168Test.java new file mode 100644 index 000000000..2fe9f76f5 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app168/SpringDocApp168Test.java @@ -0,0 +1,50 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app168; + +import java.util.Optional; + +import io.swagger.v3.core.converter.ModelConverter; +import io.swagger.v3.core.converter.ModelConverters; +import org.springdoc.core.Constants; +import org.springdoc.core.converters.PolymorphicModelConverter; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; + + +@TestPropertySource(properties = Constants.SPRINGDOC_POLYMORPHIC_CONVERTER_ENABLED + "=false") +public class SpringDocApp168Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + + static { + Optional modelConverterOptional = + ModelConverters.getInstance().getConverters() + .stream().filter(modelConverter -> modelConverter instanceof PolymorphicModelConverter).findAny(); + modelConverterOptional.ifPresent(ModelConverters.getInstance()::removeConverter); + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app169/DefaultRequestMappingHandlerMapping.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app169/DefaultRequestMappingHandlerMapping.java similarity index 63% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app169/DefaultRequestMappingHandlerMapping.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app169/DefaultRequestMappingHandlerMapping.java index 39944eeae..29bf76bb4 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app169/DefaultRequestMappingHandlerMapping.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app169/DefaultRequestMappingHandlerMapping.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app169; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app169; import org.springframework.expression.ParserContext; import org.springframework.expression.spel.standard.SpelExpressionParser; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app169/DefaultWebMvcRegistrations.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app169/DefaultWebMvcRegistrations.java new file mode 100644 index 000000000..fea5752df --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app169/DefaultWebMvcRegistrations.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app169; + +import org.springframework.boot.autoconfigure.web.servlet.WebMvcRegistrations; +import org.springframework.stereotype.Component; +import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; + +@Component +public class DefaultWebMvcRegistrations implements WebMvcRegistrations { + + @Override + public RequestMappingHandlerMapping getRequestMappingHandlerMapping() { + return new DefaultRequestMappingHandlerMapping(); + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app169/SpringDocApp169Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app169/SpringDocApp169Test.java new file mode 100644 index 000000000..45d19fc32 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app169/SpringDocApp169Test.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app169; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + + +public class SpringDocApp169Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app169/TestController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app169/TestController.java new file mode 100644 index 000000000..d0ebf3093 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app169/TestController.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app169; + +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class TestController { + + @PostMapping("/echo") + public String echo(String content) { + return content; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app17/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app17/HelloController.java new file mode 100644 index 000000000..1cdd46e18 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app17/HelloController.java @@ -0,0 +1,40 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app17; + +import javax.validation.Valid; +import javax.validation.constraints.Size; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping(value = "/persons") + public void persons(@Valid @RequestParam @Size(min = 4, max = 6) String name) { + + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app17/SpringDocApp17Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app17/SpringDocApp17Test.java new file mode 100644 index 000000000..ed4676c43 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app17/SpringDocApp17Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app17; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp17Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app170/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app170/HelloController.java new file mode 100644 index 000000000..ec10dc741 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app170/HelloController.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app170; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + @GetMapping("hello") + public String hello() { + return "Hello"; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app170/SpringDocApp170Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app170/SpringDocApp170Test.java new file mode 100644 index 000000000..69008bad6 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app170/SpringDocApp170Test.java @@ -0,0 +1,48 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app170; + +import org.junit.jupiter.api.Test; +import org.springdoc.core.customizers.OpenApiCustomiser; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; + + +public class SpringDocApp170Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp { + @Bean + public OpenApiCustomiser openApiCustomiser() { + return openApi -> openApi.getServers().forEach(s -> s.url("URL")); + } + } + + @Test + public void testApp1() throws Exception { + this.testApp(); + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app171/HelloLocaleController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app171/HelloLocaleController.java new file mode 100644 index 000000000..e21b5dd38 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app171/HelloLocaleController.java @@ -0,0 +1,46 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app171; + +import javax.validation.Valid; +import javax.validation.constraints.NotBlank; + +import io.swagger.v3.oas.annotations.tags.Tag; + +import org.springframework.http.HttpEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@Tag(name = "greeting", description = "test") +public class HelloLocaleController { + + @GetMapping("/persons") + public void persons(@Valid @NotBlank String name) { + } + + @GetMapping("/test") + public HttpEntity demo2() { + return null; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app171/SpringDocApp171Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app171/SpringDocApp171Test.java similarity index 66% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app171/SpringDocApp171Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app171/SpringDocApp171Test.java index 7df6629e5..d5e00112d 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app171/SpringDocApp171Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app171/SpringDocApp171Test.java @@ -1,29 +1,33 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app171; +package test.org.springdoc.api.v30.app171; import java.util.Locale; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; import org.springdoc.core.customizers.OpenApiLocaleCustomizer; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -40,7 +44,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @TestPropertySource(properties = Constants.SPRINGDOC_CACHE_DISABLED + "=false") -public class SpringDocApp171Test extends AbstractSpringDocTest { +public class SpringDocApp171Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp { @@ -72,7 +76,7 @@ private void testApp(Locale locale) throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL).locale(locale).header(HttpHeaders.ACCEPT_LANGUAGE, locale.toLanguageTag())).andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))).andReturn(); String result = mockMvcResult.getResponse().getContentAsString(); - String expected = getContent("results/app" + testNumber + "-" + locale.toLanguageTag() + ".json"); + String expected = getContent("results/3.0.1/app" + testNumber + "-" + locale.toLanguageTag() + ".json"); assertEquals(expected, result, true); } } \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app172/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app172/HelloController.java new file mode 100644 index 000000000..4635ceaae --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app172/HelloController.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app172; + + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping("/customer/{id}") + public String getTenantById(@PathVariable("id") String customerId) { + return "Tenant_" + customerId; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app172/SpringDocApp172Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app172/SpringDocApp172Test.java similarity index 60% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app172/SpringDocApp172Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app172/SpringDocApp172Test.java index 7b68f90ac..8ffad4812 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app172/SpringDocApp172Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app172/SpringDocApp172Test.java @@ -1,29 +1,33 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app172; +package test.org.springdoc.api.v30.app172; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; import org.springdoc.core.GroupedOpenApi; import org.springdoc.core.customizers.OpenApiCustomiser; import org.springdoc.core.customizers.OperationCustomizer; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; @@ -37,7 +41,7 @@ @TestPropertySource(properties = { "springdoc.show-actuator=true", "management.endpoints.enabled-by-default=true", "management.endpoints.web.exposure.include = tenant" }) -public class SpringDocApp172Test extends AbstractSpringDocTest { +public class SpringDocApp172Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp { @@ -45,7 +49,7 @@ static class SpringDocTestApp { public GroupedOpenApi actuatorApi(OpenApiCustomiser actuatorOpenApiCustomiser, OperationCustomizer actuatorCustomizer) { return GroupedOpenApi.builder() .group("sample-group") - .packagesToScan("test.org.springdoc.api.app172") + .packagesToScan("test.org.springdoc.api.v30.app172") .addOpenApiCustomiser(actuatorOpenApiCustomiser) .addOperationCustomizer(actuatorCustomizer) .pathsToExclude("/health/*") @@ -58,7 +62,7 @@ public void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/sample-group")) .andExpect(jsonPath("$.openapi", is("3.0.1"))) .andExpect(status().isOk()) - .andExpect(content().json(getContent("results/app172.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app172.json"), true)); } } \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app173/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app173/HelloController.java new file mode 100644 index 000000000..da86a7f6f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app173/HelloController.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app173; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping("/test") + public void printHello() { + System.out.println("Hello"); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app173/SpringDocApp173Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app173/SpringDocApp173Test.java similarity index 60% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app173/SpringDocApp173Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app173/SpringDocApp173Test.java index be267924f..6102b918e 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app173/SpringDocApp173Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app173/SpringDocApp173Test.java @@ -1,29 +1,33 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app173; +package test.org.springdoc.api.v30.app173; import java.util.Locale; import io.swagger.v3.oas.models.OpenAPI; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; @@ -36,7 +40,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -public class SpringDocApp173Test extends AbstractSpringDocTest { +public class SpringDocApp173Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp { @@ -61,7 +65,7 @@ private void testApp(Locale locale) throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL).locale(locale).header(HttpHeaders.ACCEPT_LANGUAGE, locale.toLanguageTag())).andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))).andReturn(); String result = mockMvcResult.getResponse().getContentAsString(); - String expected = getContent("results/app" + testNumber +".json"); + String expected = getContent("results/3.0.1/app" + testNumber +".json"); assertEquals(expected, result, true); } diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app174/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app174/PersonDTO.java new file mode 100644 index 000000000..8d5d78772 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app174/PersonDTO.java @@ -0,0 +1,64 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app174; + +public class PersonDTO { + private String email; + + private String firstName; + + private String lastName; + + public PersonDTO() { + } + + public PersonDTO(final String email, final String firstName, final String lastName) { + this.email = email; + this.firstName = firstName; + this.lastName = lastName; + } + + public String getEmail() { + return email; + } + + public void setEmail(final String email) { + this.email = email; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(final String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(final String lastName) { + this.lastName = lastName; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app174/SpringDocApp174Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app174/SpringDocApp174Test.java similarity index 69% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app174/SpringDocApp174Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app174/SpringDocApp174Test.java index 391e54b6a..1ef939428 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app174/SpringDocApp174Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app174/SpringDocApp174Test.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app174; +package test.org.springdoc.api.v30.app174; import java.util.Arrays; import java.util.List; @@ -32,8 +36,8 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import org.springdoc.core.annotations.RouterOperation; import org.springdoc.core.annotations.RouterOperations; -import test.org.springdoc.api.AbstractSpringDocTest; -import test.org.springdoc.api.app175.PersonDTO; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; +import test.org.springdoc.api.v30.app175.PersonDTO; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.function.context.config.ContextFunctionCatalogAutoConfiguration; @@ -44,7 +48,7 @@ import org.springframework.web.bind.annotation.RequestMethod; @Import({ ReactorAutoConfiguration.class, FunctionExporterAutoConfiguration.class, ContextFunctionCatalogAutoConfiguration.class }) -public class SpringDocApp174Test extends AbstractSpringDocTest { +public class SpringDocApp174Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp { @@ -71,13 +75,13 @@ public Function, List> lowercase() { @Bean(name = "titi") @RouterOperation(operation = @Operation(description = "Say hello By Id", operationId = "hellome", tags = "persons", - responses = @ApiResponse(responseCode = "200", content = @Content(schema = @Schema(implementation = test.org.springdoc.api.app175.PersonDTO.class))))) - public Supplier helloSupplier() { - return test.org.springdoc.api.app175.PersonDTO::new; + responses = @ApiResponse(responseCode = "200", content = @Content(schema = @Schema(implementation = PersonDTO.class))))) + public Supplier helloSupplier() { + return PersonDTO::new; } @Bean - public Consumer helloConsumer() { + public Consumer helloConsumer() { return PersonDTO::getFirstName; } diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app175/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app175/PersonDTO.java new file mode 100644 index 000000000..70467c927 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app175/PersonDTO.java @@ -0,0 +1,64 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app175; + +public class PersonDTO { + private String email; + + private String firstName; + + private String lastName; + + public PersonDTO() { + } + + public PersonDTO(final String email, final String firstName, final String lastName) { + this.email = email; + this.firstName = firstName; + this.lastName = lastName; + } + + public String getEmail() { + return email; + } + + public void setEmail(final String email) { + this.email = email; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(final String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(final String lastName) { + this.lastName = lastName; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app175/SpringDocApp175Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app175/SpringDocApp175Test.java similarity index 76% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app175/SpringDocApp175Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app175/SpringDocApp175Test.java index c55acfd50..045f6d458 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app175/SpringDocApp175Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app175/SpringDocApp175Test.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app175; +package test.org.springdoc.api.v30.app175; import java.util.Arrays; import java.util.List; @@ -32,7 +36,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import org.springdoc.core.annotations.RouterOperation; import org.springdoc.core.annotations.RouterOperations; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.function.context.config.ContextFunctionCatalogAutoConfiguration; @@ -45,7 +49,7 @@ @Import({ ReactorAutoConfiguration.class, FunctionExporterAutoConfiguration.class, ContextFunctionCatalogAutoConfiguration.class }) @TestPropertySource(properties="springdoc.show-spring-cloud-functions=false") -public class SpringDocApp175Test extends AbstractSpringDocTest { +public class SpringDocApp175Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp { diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app176/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app176/HelloController.java similarity index 59% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app176/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app176/HelloController.java index 1dc9b2e54..b74114c5d 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app176/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app176/HelloController.java @@ -1,27 +1,31 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app176; +package test.org.springdoc.api.v30.app176; import java.util.List; import org.springdoc.api.annotations.ParameterObject; -import test.org.springdoc.api.app13.PersonDTO; +import test.org.springdoc.api.v30.app13.PersonDTO; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort.Direction; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app176/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app176/PersonDTO.java new file mode 100644 index 000000000..734c1fe03 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app176/PersonDTO.java @@ -0,0 +1,67 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app176; + +import io.swagger.v3.oas.annotations.media.Schema; + +@Schema +public class PersonDTO { + private String email; + + private String firstName; + + private String lastName; + + public PersonDTO() { + } + + public PersonDTO(final String email, final String firstName, final String lastName) { + this.email = email; + this.firstName = firstName; + this.lastName = lastName; + } + + public String getEmail() { + return email; + } + + public void setEmail(final String email) { + this.email = email; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(final String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(final String lastName) { + this.lastName = lastName; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app176/SpringDocApp176Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app176/SpringDocApp176Test.java similarity index 78% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app176/SpringDocApp176Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app176/SpringDocApp176Test.java index 030fe42bf..00afdf599 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app176/SpringDocApp176Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app176/SpringDocApp176Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,16 +18,15 @@ * * * * * * - * */ -package test.org.springdoc.api.app176; +package test.org.springdoc.api.v30.app176; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; -public class SpringDocApp176Test extends AbstractSpringDocTest { +public class SpringDocApp176Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app177/AnnotatedController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app177/AnnotatedController.java similarity index 69% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app177/AnnotatedController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app177/AnnotatedController.java index 993ffd91c..213ee6eea 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app177/AnnotatedController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app177/AnnotatedController.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app177; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app177; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app177/SpringDocApp177Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app177/SpringDocApp177Test.java similarity index 81% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app177/SpringDocApp177Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app177/SpringDocApp177Test.java index d5c06d410..8365bc015 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app177/SpringDocApp177Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app177/SpringDocApp177Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,14 +18,13 @@ * * * * * * - * */ -package test.org.springdoc.api.app177; +package test.org.springdoc.api.v30.app177; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -35,7 +34,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -class SpringDocApp177Test extends AbstractSpringDocTest { +class SpringDocApp177Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} @@ -45,7 +44,7 @@ void testFilterOnlyPicksUpMatchedMethods() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/annotatedGroup1")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app177-1.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app177-1.json"), true)); } @Test @@ -53,7 +52,7 @@ void testFilterOnlyPicksUpMatchedMethodsWithDifferentFilter() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/annotatedGroup2")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app177-2.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app177-2.json"), true)); } @Test @@ -61,7 +60,7 @@ void testFilterOnlyPicksUpCombinedMatchedMethods() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/annotatedCombinedGroup")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app177-3.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app177-3.json"), true)); } } \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app178/AnnotatedController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app178/AnnotatedController.java similarity index 72% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app178/AnnotatedController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app178/AnnotatedController.java index da4e33b94..354c4a9cf 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app178/AnnotatedController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app178/AnnotatedController.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app178; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app178; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app178/SpringDocApp178Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app178/SpringDocApp178Test.java similarity index 81% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app178/SpringDocApp178Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app178/SpringDocApp178Test.java index 54daa4526..bd6be22b9 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app178/SpringDocApp178Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app178/SpringDocApp178Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,14 +18,13 @@ * * * * * * - * */ -package test.org.springdoc.api.app178; +package test.org.springdoc.api.v30.app178; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -35,7 +34,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -class SpringDocApp178Test extends AbstractSpringDocTest { +class SpringDocApp178Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} @@ -45,7 +44,7 @@ void testFilterOnlyPicksUpMatchedMethods() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/annotatedGroup1")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app178-1.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app178-1.json"), true)); } @Test @@ -53,7 +52,7 @@ void testFilterOnlyPicksUpMatchedMethodsWithDifferentFilter() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/annotatedGroup2")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app178-2.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app178-2.json"), true)); } @Test @@ -61,7 +60,7 @@ void testFilterOnlyPicksUpCombinedMatchedMethods() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/annotatedCombinedGroup")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app178-3.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app178-3.json"), true)); } } \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/HelloController.java new file mode 100644 index 000000000..c4365e843 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/HelloController.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app179; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + + +@RestController +public class HelloController { + @GetMapping("/test/{objId}") + String test(@MyIdPathVariable MyObj obj) { + return obj.getContent(); + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/MyConfiguration.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/MyConfiguration.java new file mode 100644 index 000000000..9e4a1c3dc --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/MyConfiguration.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app179; + +import java.util.List; + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.method.support.HandlerMethodArgumentResolver; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +public class MyConfiguration implements WebMvcConfigurer { + @Override + public void addArgumentResolvers(List resolvers) { + resolvers.add(new MyObjArgumentResolver()); + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/MyIdPathVariable.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/MyIdPathVariable.java new file mode 100644 index 000000000..493df9746 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/MyIdPathVariable.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app179; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.PARAMETER) +public @interface MyIdPathVariable { +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/MyObj.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/MyObj.java new file mode 100644 index 000000000..46c5012c9 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/MyObj.java @@ -0,0 +1,41 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app179; + +public class MyObj { + private final String id; + private final String content; + + public MyObj(String id, String content) { + this.id = id; + this.content = content; + } + + public String getId() { + return id; + } + + public String getContent() { + return content; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/MyObjArgumentResolver.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/MyObjArgumentResolver.java similarity index 50% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/MyObjArgumentResolver.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/MyObjArgumentResolver.java index 7ce83a79a..a59105acf 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app179/MyObjArgumentResolver.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/MyObjArgumentResolver.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app179; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app179; import org.springframework.core.MethodParameter; import org.springframework.web.bind.support.WebDataBinderFactory; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/MyPathParameterCustomizer.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/MyPathParameterCustomizer.java new file mode 100644 index 000000000..d4ef0028e --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/MyPathParameterCustomizer.java @@ -0,0 +1,45 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app179; + +import io.swagger.v3.oas.models.media.StringSchema; +import io.swagger.v3.oas.models.parameters.Parameter; +import io.swagger.v3.oas.models.parameters.PathParameter; +import org.springdoc.core.customizers.ParameterCustomizer; + +import org.springframework.core.MethodParameter; +import org.springframework.stereotype.Component; + +@Component +public class MyPathParameterCustomizer implements ParameterCustomizer { + @Override + public Parameter customize(Parameter parameterModel, MethodParameter methodParameter) { + if (methodParameter.hasParameterAnnotation(MyIdPathVariable.class)) { + Parameter alternativeParameter = new PathParameter(); + alternativeParameter.setName("objId"); + alternativeParameter.setSchema(new StringSchema()); + return alternativeParameter; + } + return parameterModel; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/SpringDocApp179Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/SpringDocApp179Test.java new file mode 100644 index 000000000..fe6ef7f98 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app179/SpringDocApp179Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app179; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp179Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app18/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app18/HelloController.java similarity index 61% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app18/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app18/HelloController.java index 9cb1b085b..e2d1d9a22 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app18/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app18/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app18; +package test.org.springdoc.api.v30.app18; import javax.validation.constraints.NegativeOrZero; import javax.validation.constraints.NotBlank; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app18/SpringDocApp18Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app18/SpringDocApp18Test.java new file mode 100644 index 000000000..f3a036b96 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app18/SpringDocApp18Test.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app18; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; + +@TestPropertySource(properties = "springdoc.pre-loading-enabled=true") +public class SpringDocApp18Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app180/Body.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app180/Body.java similarity index 60% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app180/Body.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app180/Body.java index f0db2d0ac..83e7d144c 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app180/Body.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app180/Body.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app180; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app180; import java.util.Collection; import java.util.Map; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app180/MapExclusion.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app180/MapExclusion.java new file mode 100644 index 000000000..55c5349ad --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app180/MapExclusion.java @@ -0,0 +1,30 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app180; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +public interface MapExclusion { + @JsonIgnore + boolean isEmpty(); +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app180/RESTService.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app180/RESTService.java similarity index 60% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app180/RESTService.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app180/RESTService.java index 830da5d18..481db8f16 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app180/RESTService.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app180/RESTService.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app180; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app180; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app180/SpringDocApp180Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app180/SpringDocApp180Test.java similarity index 78% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app180/SpringDocApp180Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app180/SpringDocApp180Test.java index b6c90f243..34417247e 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app180/SpringDocApp180Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app180/SpringDocApp180Test.java @@ -2,7 +2,7 @@ * * * * * * - * * * * Copyright 2019-2020 the original author or authors. + * * * * Copyright 2019-2022 the original author or authors. * * * * * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * * * you may not use this file except in compliance with the License. @@ -18,16 +18,15 @@ * * * * * * - * */ -package test.org.springdoc.api.app180; +package test.org.springdoc.api.v30.app180; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; -class SpringDocApp180Test extends AbstractSpringDocTest { +class SpringDocApp180Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp {} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app181/AbstractParameterObject.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app181/AbstractParameterObject.java new file mode 100644 index 000000000..9005f4ec0 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app181/AbstractParameterObject.java @@ -0,0 +1,46 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app181; + +public class AbstractParameterObject { + + int primitiveBaseField; + + T genericField; + + public int getPrimitiveBaseField() { + return primitiveBaseField; + } + + public void setPrimitiveBaseField(int primitiveBaseField) { + this.primitiveBaseField = primitiveBaseField; + } + + public T getGenericField() { + return genericField; + } + + public void setGenericField(T genericField) { + this.genericField = genericField; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app181/ConcreteParameterObject.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app181/ConcreteParameterObject.java new file mode 100644 index 000000000..7a803f3f1 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app181/ConcreteParameterObject.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app181; + +public class ConcreteParameterObject extends AbstractParameterObject { + + int primitiveConcreteField; + + public int getPrimitiveConcreteField() { + return primitiveConcreteField; + } + + public void setPrimitiveConcreteField(int primitiveConcreteField) { + this.primitiveConcreteField = primitiveConcreteField; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app181/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app181/HelloController.java new file mode 100644 index 000000000..b27501354 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app181/HelloController.java @@ -0,0 +1,42 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app181; + +import org.springdoc.api.annotations.ParameterObject; + +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping( "/test1") + public ResponseEntity sayHello( @ParameterObject final ConcreteParameterObject test) { + System.out.println("Field B = " + test); + return new ResponseEntity("{\"Say\": \"Hello\"}", HttpStatus.OK); + } + + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app181/SpringDocApp181Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app181/SpringDocApp181Test.java new file mode 100644 index 000000000..6dbd88f33 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app181/SpringDocApp181Test.java @@ -0,0 +1,38 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app181; + + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * Tests Spring meta-annotations as method parameters + */ +public class SpringDocApp181Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app182/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app182/HelloController.java similarity index 60% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app182/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app182/HelloController.java index 5cd36652e..ec4e97462 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app182/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app182/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app182; +package test.org.springdoc.api.v30.app182; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app182/SpringDocApp182Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app182/SpringDocApp182Test.java new file mode 100644 index 000000000..9323f6542 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app182/SpringDocApp182Test.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app182; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + + +/** + * Copy of 124 without RestControllerAdvice class + */ +public class SpringDocApp182Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app183/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app183/HelloController.java new file mode 100644 index 000000000..beeec57ae --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app183/HelloController.java @@ -0,0 +1,47 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app183; + +import io.swagger.v3.oas.annotations.tags.Tag; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RestController; + +/** + * The type Hello controller. + */ +@RestController +@Tag(name = "NetworkServices", description = "the NetworkServices API") +public class HelloController { + + + + + @GetMapping("/{userId}") + public User doSomething(@PathVariable("userId") User user) { + return new User(user.getId(), "tototot"); + } + + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app183/SpringDocApp183Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app183/SpringDocApp183Test.java new file mode 100644 index 000000000..930158567 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app183/SpringDocApp183Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app183; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp183Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app183/User.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app183/User.java new file mode 100644 index 000000000..079593d17 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app183/User.java @@ -0,0 +1,63 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app183; + +public class User { + + String id; + + String toto; + + + public User() { + } + + public User(String id, String toto) { + this.id = id; + this.toto = toto; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getToto() { + return toto; + } + + public void setToto(String toto) { + this.toto = toto; + } + + @Override + public String toString() { + return "User{" + + "id='" + id + '\'' + + ", toto='" + toto + '\'' + + '}'; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app183/UserConverter.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app183/UserConverter.java new file mode 100644 index 000000000..412fa858c --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app183/UserConverter.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app183; + +import org.springframework.core.convert.converter.Converter; + +public class UserConverter implements Converter { + + @Override + public User convert(String userId) { + // Fetch from repository + User user = new User(); + user.setId(userId); + return user; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app183/WebConfig.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app183/WebConfig.java new file mode 100644 index 000000000..5363e81eb --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app183/WebConfig.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app183; + +import org.springframework.context.annotation.Configuration; +import org.springframework.format.FormatterRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +public class WebConfig implements WebMvcConfigurer { + + @Override + public void addFormatters(FormatterRegistry registry) { + registry.addConverter(new UserConverter()); + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app184/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app184/HelloController.java new file mode 100644 index 000000000..f67702a0f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app184/HelloController.java @@ -0,0 +1,57 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app184; + + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping("/globalBeanFiltered") + public String globalBeanFiltered() { + return "globalBeanFiltered"; + } + + @GetMapping("/beanFiltered") + public String beanFiltered() { + return "beanFiltered"; + } + + @GetMapping("/group1Filtered") + public String group1Filtered() { + return "group1Filtered"; + } + + @GetMapping("/group2Filtered") + public String group2Filtered() { + return "group2Filtered"; + } + + @GetMapping("/group3Filtered") + public String group3Filtered() { + return "group3Filtered"; + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app184/SpringDocApp184Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app184/SpringDocApp184Test.java similarity index 75% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app184/SpringDocApp184Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app184/SpringDocApp184Test.java index 0391e7680..1e84b4b99 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app184/SpringDocApp184Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app184/SpringDocApp184Test.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app184; +package test.org.springdoc.api.v30.app184; import java.util.Objects; @@ -31,7 +35,7 @@ import org.springdoc.core.customizers.OperationCustomizer; import org.springdoc.core.filters.GlobalOpenApiMethodFilter; import org.springdoc.core.filters.OpenApiMethodFilter; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; @@ -45,7 +49,7 @@ "springdoc.group-configs[0].group=group1", "springdoc.group-configs[0].paths-to-exclude=/group1Filtered", }) -public class SpringDocApp184Test extends AbstractSpringDocTest { +public class SpringDocApp184Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp { @@ -106,21 +110,21 @@ public GroupedOpenApi group3() { public void testGroup1() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/group1")) .andExpect(status().isOk()) - .andExpect(content().json(getContent("results/app184-1.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app184-1.json"), true)); } @Test public void testGroup2() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/group2")) .andExpect(status().isOk()) - .andExpect(content().json(getContent("results/app184-2.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app184-2.json"), true)); } @Test public void testGroup3() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/group3")) .andExpect(status().isOk()) - .andExpect(content().json(getContent("results/app184-3.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app184-3.json"), true)); } } \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app185/Cat.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app185/Cat.java new file mode 100644 index 000000000..4afee62d0 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app185/Cat.java @@ -0,0 +1,46 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app185; + +import io.swagger.v3.oas.annotations.media.Schema; + +@Schema +public class Cat extends Pet { + + private final boolean meows; + + public Cat() { + super(); + this.meows = false; + } + + public Cat(boolean meows, String name) { + super(name); + this.meows = meows; + } + + public boolean getMeows() { + return meows; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app185/Dog.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app185/Dog.java new file mode 100644 index 000000000..ae6405c3d --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app185/Dog.java @@ -0,0 +1,46 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app185; + +import io.swagger.v3.oas.annotations.media.Schema; + +@Schema +public class Dog extends Pet { + + private final boolean barks; + + public Dog() { + super(); + this.barks = false; + } + + public Dog(boolean barks, String name) { + super(name); + this.barks = barks; + } + + public boolean getBarks() { + return barks; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app185/Pet.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app185/Pet.java new file mode 100644 index 000000000..92ac92ed9 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app185/Pet.java @@ -0,0 +1,45 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app185; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type") +@JsonSubTypes({ + @JsonSubTypes.Type(Dog.class), + @JsonSubTypes.Type(Cat.class) +}) +public class Pet { + + public final String name; + + public Pet() { + this.name = null; + } + + public Pet(String name) { + this.name = name; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app185/PetController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app185/PetController.java new file mode 100644 index 000000000..5ef6f09aa --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app185/PetController.java @@ -0,0 +1,40 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app185; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class PetController { + + @GetMapping("/any") + public Pet getAnyPet() { + return new Cat(true, "cat"); + } + + @GetMapping("/dog") + public Dog getDog() { + return new Dog(true, "dog"); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app185/SpringDocApp185Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app185/SpringDocApp185Test.java new file mode 100644 index 000000000..e8def0dd9 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app185/SpringDocApp185Test.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app185; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp185Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app19/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app19/HelloController.java similarity index 52% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app19/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app19/HelloController.java index 038d3a87a..5179bd62a 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app19/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app19/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app19; +package test.org.springdoc.api.v30.app19; import javax.validation.constraints.NotBlank; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app19/SpringDocApp19Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app19/SpringDocApp19Test.java new file mode 100644 index 000000000..dd18bd5e1 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app19/SpringDocApp19Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app19; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp19Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/SpringDocApp2Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/SpringDocApp2Test.java similarity index 55% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/SpringDocApp2Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/SpringDocApp2Test.java index f7db0612f..4db6da0b8 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/SpringDocApp2Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/SpringDocApp2Test.java @@ -1,34 +1,38 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app2; +package test.org.springdoc.api.v30.app2; import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.info.License; import io.swagger.v3.oas.models.security.SecurityScheme; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; -public class SpringDocApp2Test extends AbstractSpringDocTest { +public class SpringDocApp2Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp { diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/ApiUtil.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/ApiUtil.java similarity index 53% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/ApiUtil.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/ApiUtil.java index e85b410a4..b924fb897 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/ApiUtil.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/ApiUtil.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app105.api; +package test.org.springdoc.api.v30.app2.api; import java.io.IOException; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/ExceptionTranslator.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/ExceptionTranslator.java similarity index 60% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/ExceptionTranslator.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/ExceptionTranslator.java index 2f0a1b392..49cf227f5 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/ExceptionTranslator.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/ExceptionTranslator.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app105.api; +package test.org.springdoc.api.v30.app2.api; import java.util.Map; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/HomeController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/HomeController.java new file mode 100644 index 000000000..2463dfbe3 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/HomeController.java @@ -0,0 +1,46 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app2.api; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; + +import static org.springdoc.core.Constants.SWAGGER_UI_PATH; +import static org.springframework.util.AntPathMatcher.DEFAULT_PATH_SEPARATOR; +import static org.springframework.web.servlet.view.UrlBasedViewResolver.REDIRECT_URL_PREFIX; + +/** + * Home redirection to swagger api documentation + */ +@Controller +public class HomeController { + + @Value(SWAGGER_UI_PATH) + private String swaggerUiPath; + + @GetMapping(DEFAULT_PATH_SEPARATOR) + public String index() { + return REDIRECT_URL_PREFIX + swaggerUiPath; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/PetApi.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/PetApi.java similarity index 90% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/PetApi.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/PetApi.java index e1ff96749..cdf22bb0a 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/PetApi.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/PetApi.java @@ -1,18 +1,22 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ @@ -21,7 +25,7 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -package test.org.springdoc.api.app2.api; +package test.org.springdoc.api.v30.app2.api; import java.util.List; @@ -42,8 +46,8 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.security.SecurityScheme; import io.swagger.v3.oas.annotations.tags.Tag; -import test.org.springdoc.api.app2.model.ModelApiResponse; -import test.org.springdoc.api.app2.model.Pet; +import test.org.springdoc.api.v30.app2.model.ModelApiResponse; +import test.org.springdoc.api.v30.app2.model.Pet; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiController.java new file mode 100644 index 000000000..043eb04ea --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiController.java @@ -0,0 +1,48 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app2.api; + +import java.util.Optional; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; + +@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") + +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/}") +public class PetApiController implements PetApi { + + private final PetApiDelegate delegate; + + public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() { + }); + } + + @Override + public PetApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/pet/PetApiDelegate.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiDelegate.java similarity index 79% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/pet/PetApiDelegate.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiDelegate.java index 2b28668b2..1c9dc8635 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/pet/PetApiDelegate.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiDelegate.java @@ -1,31 +1,34 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app68.api.pet; +package test.org.springdoc.api.v30.app2.api; import java.util.List; import java.util.Optional; import javax.validation.Valid; -import test.org.springdoc.api.app68.api.ApiUtil; -import test.org.springdoc.api.app68.model.ModelApiResponse; -import test.org.springdoc.api.app68.model.Pet; +import test.org.springdoc.api.v30.app2.model.ModelApiResponse; +import test.org.springdoc.api.v30.app2.model.Pet; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiDelegateImpl.java new file mode 100644 index 000000000..dac691629 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/PetApiDelegateImpl.java @@ -0,0 +1,31 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app2.api; + +import org.springframework.stereotype.Service; + +@Service +public class PetApiDelegateImpl implements PetApiDelegate { + + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/StoreApi.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApi.java similarity index 82% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/StoreApi.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApi.java index 62e007ad7..849149dfa 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/StoreApi.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApi.java @@ -1,18 +1,22 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ @@ -21,7 +25,7 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -package test.org.springdoc.api.app2.api; +package test.org.springdoc.api.v30.app2.api; import java.util.Map; @@ -38,7 +42,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; -import test.org.springdoc.api.app2.model.Order; +import test.org.springdoc.api.v30.app2.model.Order; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiController.java new file mode 100644 index 000000000..f8d7ce0c9 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiController.java @@ -0,0 +1,48 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app2.api; + +import java.util.Optional; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; + +@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") + +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/}") +public class StoreApiController implements StoreApi { + + private final StoreApiDelegate delegate; + + public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() { + }); + } + + @Override + public StoreApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/StoreApiDelegate.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiDelegate.java similarity index 72% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/StoreApiDelegate.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiDelegate.java index 77f3039c9..76df2ca00 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/StoreApiDelegate.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiDelegate.java @@ -1,27 +1,31 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app2.api; +package test.org.springdoc.api.v30.app2.api; import java.util.Map; import java.util.Optional; -import test.org.springdoc.api.app2.model.Order; +import test.org.springdoc.api.v30.app2.model.Order; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiDelegateImpl.java new file mode 100644 index 000000000..b2e871a77 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/StoreApiDelegateImpl.java @@ -0,0 +1,31 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app2.api; + +import org.springframework.stereotype.Service; + +@Service +public class StoreApiDelegateImpl implements StoreApiDelegate { + + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/user/UserApi.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/UserApi.java similarity index 87% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/user/UserApi.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/UserApi.java index a10fcb498..959300547 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/user/UserApi.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/UserApi.java @@ -1,18 +1,22 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ @@ -21,7 +25,7 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -package test.org.springdoc.api.app68.api.user; +package test.org.springdoc.api.v30.app2.api; import java.util.List; @@ -35,7 +39,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; -import test.org.springdoc.api.app68.model.User; +import test.org.springdoc.api.v30.app2.model.User; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/UserApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiController.java similarity index 51% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/UserApiController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiController.java index b0585ab6b..2afddc1ec 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/UserApiController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app2.api; +package test.org.springdoc.api.v30.app2.api; import java.util.Optional; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/user/UserApiDelegate.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiDelegate.java similarity index 77% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/user/UserApiDelegate.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiDelegate.java index 022192fc8..2ca5e7f1d 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/user/UserApiDelegate.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiDelegate.java @@ -1,28 +1,31 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app68.api.user; +package test.org.springdoc.api.v30.app2.api; import java.util.List; import java.util.Optional; -import test.org.springdoc.api.app68.api.ApiUtil; -import test.org.springdoc.api.app68.model.User; +import test.org.springdoc.api.v30.app2.model.User; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiDelegateImpl.java new file mode 100644 index 000000000..74a761e3b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/api/UserApiDelegateImpl.java @@ -0,0 +1,31 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app2.api; + +import org.springframework.stereotype.Service; + +@Service +public class UserApiDelegateImpl implements UserApiDelegate { + + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/Body.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/Body.java similarity index 65% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/Body.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/Body.java index 7298a4be1..707cfc7a3 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/Body.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/Body.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app2.model; +package test.org.springdoc.api.v30.app2.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/Body1.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/Body1.java similarity index 68% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/Body1.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/Body1.java index a6f95a42b..1f91c1e4f 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/Body1.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/Body1.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app2.model; +package test.org.springdoc.api.v30.app2.model; import java.io.File; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/Category.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/Category.java similarity index 62% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/Category.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/Category.java index 8a1477eb3..b0155127c 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/Category.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/Category.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app2.model; +package test.org.springdoc.api.v30.app2.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/ModelApiResponse.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/ModelApiResponse.java similarity index 69% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/ModelApiResponse.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/ModelApiResponse.java index 13ad6770a..3d3b9c59b 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/ModelApiResponse.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/ModelApiResponse.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app2.model; +package test.org.springdoc.api.v30.app2.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/Order.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/Order.java similarity index 82% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/Order.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/Order.java index 9194b6b04..bd562704b 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/Order.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/Order.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app2.model; +package test.org.springdoc.api.v30.app2.model; import java.util.Date; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/Pet.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/Pet.java similarity index 84% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/Pet.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/Pet.java index cbe342ef8..a32588dbe 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/Pet.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/Pet.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app2.model; +package test.org.springdoc.api.v30.app2.model; import java.util.ArrayList; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/Tag.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/Tag.java similarity index 61% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/Tag.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/Tag.java index aef0fae03..8589d0649 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/Tag.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/Tag.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app2.model; +package test.org.springdoc.api.v30.app2.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/User.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/User.java similarity index 83% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/User.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/User.java index 759579b2c..4f33ce1e1 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/model/User.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app2/model/User.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app2.model; +package test.org.springdoc.api.v30.app2.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app20/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app20/HelloController.java new file mode 100644 index 000000000..4435dcde4 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app20/HelloController.java @@ -0,0 +1,42 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app20; + +import javax.validation.Valid; +import javax.validation.constraints.NotBlank; + +import io.swagger.v3.oas.annotations.Hidden; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping(value = "/persons") + @Hidden + public void persons(@Valid @NotBlank String name) { + + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app20/SpringDocApp20Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app20/SpringDocApp20Test.java new file mode 100644 index 000000000..5b9a35f6b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app20/SpringDocApp20Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app20; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp20Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app21/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app21/HelloController.java similarity index 63% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app21/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app21/HelloController.java index b819faa29..20e276459 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app21/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app21/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app21; +package test.org.springdoc.api.v30.app21; import javax.validation.Valid; import javax.validation.constraints.NotBlank; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app21/SpringDocApp21Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app21/SpringDocApp21Test.java new file mode 100644 index 000000000..cab45cfa7 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app21/SpringDocApp21Test.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app21; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; + +@TestPropertySource(properties = "springdoc.oAuthFlow.authorizationUrl=http://personstore.swagger.io/oauth/dialog") +public class SpringDocApp21Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app22/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app22/HelloController.java new file mode 100644 index 000000000..70f6f8e44 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app22/HelloController.java @@ -0,0 +1,40 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app22; + +import java.util.List; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + + @GetMapping(value = "/persons") + public ResponseEntity>> doGet() { + return null; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app22/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app22/PersonDTO.java new file mode 100644 index 000000000..8a34a0b6b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app22/PersonDTO.java @@ -0,0 +1,64 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app22; + +public class PersonDTO { + private String email; + + private String firstName; + + private String lastName; + + public PersonDTO() { + } + + public PersonDTO(final String email, final String firstName, final String lastName) { + this.email = email; + this.firstName = firstName; + this.lastName = lastName; + } + + public String getEmail() { + return email; + } + + public void setEmail(final String email) { + this.email = email; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(final String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(final String lastName) { + this.lastName = lastName; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app22/SpringDocApp22Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app22/SpringDocApp22Test.java new file mode 100644 index 000000000..3ac823419 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app22/SpringDocApp22Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app22; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp22Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app23/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app23/HelloController.java similarity index 55% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app23/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app23/HelloController.java index 9b6d5bfd5..59915d61e 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app23/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app23/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app23; +package test.org.springdoc.api.v30.app23; import javax.validation.Valid; import javax.validation.constraints.NotBlank; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app23/SpringDocApp23Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app23/SpringDocApp23Test.java new file mode 100644 index 000000000..a851bfc9b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app23/SpringDocApp23Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app23; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp23Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app24/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app24/HelloController.java similarity index 54% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app24/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app24/HelloController.java index ebdd33706..442d51e12 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app24/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app24/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app24; +package test.org.springdoc.api.v30.app24; import javax.validation.Valid; import javax.validation.constraints.NotBlank; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app24/SpringDocApp24Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app24/SpringDocApp24Test.java new file mode 100644 index 000000000..d3149fdeb --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app24/SpringDocApp24Test.java @@ -0,0 +1,30 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app24; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +public class SpringDocApp24Test extends AbstractSpringDocV30Test { + + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app24/SpringDocTestApp.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app24/SpringDocTestApp.java similarity index 68% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app24/SpringDocTestApp.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app24/SpringDocTestApp.java index 337a1c990..9e2c7105b 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app24/SpringDocTestApp.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app24/SpringDocTestApp.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app24; +package test.org.springdoc.api.v30.app24; import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.OpenAPI; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app25/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app25/HelloController.java similarity index 80% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app25/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app25/HelloController.java index f07a5dbf7..4308127b6 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app25/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app25/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app25; +package test.org.springdoc.api.v30.app25; import java.time.Instant; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app25/SpringDocApp25Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app25/SpringDocApp25Test.java new file mode 100644 index 000000000..240841d3a --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app25/SpringDocApp25Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app25; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp25Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app26/Bar.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app26/Bar.java new file mode 100644 index 000000000..a54d63ca8 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app26/Bar.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app26; + +public class Bar { + private String bar; + + public String getBar() { + return bar; + } + + public void setBar(String bar) { + this.bar = bar; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app26/Foo.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app26/Foo.java new file mode 100644 index 000000000..0570847ed --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app26/Foo.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app26; + +public class Foo { + + private String foo; + + public String getFoo() { + return foo; + } + + public void setFoo(String foo) { + this.foo = foo; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app26/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app26/HelloController.java new file mode 100644 index 000000000..c8e2ecea4 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app26/HelloController.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app26; + +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @PostMapping(value = "/persons") + public MyModel persons(MyModel myModel) { + return new MyModel(); + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app26/MyModel.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app26/MyModel.java new file mode 100644 index 000000000..36af43318 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app26/MyModel.java @@ -0,0 +1,39 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app26; + +import io.swagger.v3.oas.annotations.media.Schema; + +public class MyModel { + + @Schema(description = "Hello", type = "object", oneOf = { Foo.class, Bar.class }) + private Object thing; + + public Object getThing() { + return thing; + } + + public void setThing(Object thing) { + this.thing = thing; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app26/SpringDocApp26Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app26/SpringDocApp26Test.java new file mode 100644 index 000000000..022ad5b03 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app26/SpringDocApp26Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app26; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp26Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/Advice.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/Advice.java similarity index 54% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/Advice.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/Advice.java index 7b20bc148..5407ff246 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/Advice.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/Advice.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app27; +package test.org.springdoc.api.v30.app27; import io.swagger.v3.oas.annotations.Hidden; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/Bar.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/Bar.java new file mode 100644 index 000000000..eb704e75b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/Bar.java @@ -0,0 +1,27 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app27; + +public class Bar { + public String bar = "bar"; +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/Foo.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/Foo.java new file mode 100644 index 000000000..126d69f50 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/Foo.java @@ -0,0 +1,27 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app27; + +public class Foo { + public String foo = "foo"; +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/HelloController.java new file mode 100644 index 000000000..0fb53052b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/HelloController.java @@ -0,0 +1,45 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app27; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + private boolean flag = false; + + @RequestMapping("/") + public String index() { + return ""; + } + + @GetMapping("/test") + public String test() { + flag = !flag; + throw flag ? new MyException() : new RuntimeException(); + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/MyException.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/MyException.java new file mode 100644 index 000000000..78b6af957 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/MyException.java @@ -0,0 +1,32 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app27; + +public class MyException extends RuntimeException { + + /** + * + */ + private static final long serialVersionUID = 1L; + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/SpringDocApp27Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/SpringDocApp27Test.java similarity index 53% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/SpringDocApp27Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/SpringDocApp27Test.java index 95821c9e2..26bdff7c7 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app27/SpringDocApp27Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app27/SpringDocApp27Test.java @@ -1,26 +1,30 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app27; +package test.org.springdoc.api.v30.app27; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -30,7 +34,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -public class SpringDocApp27Test extends AbstractSpringDocTest { +public class SpringDocApp27Test extends AbstractSpringDocV30Test { @Test public void testApp() throws Exception { diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app28/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app28/HelloController.java new file mode 100644 index 000000000..cfc9db067 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app28/HelloController.java @@ -0,0 +1,38 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app28; + +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +@RestController +public class HelloController { + + @PostMapping(value = "/upload2", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) + public String upload2(@RequestPart("one") MultipartFile one, @RequestPart("two") MultipartFile two) { + return "Ok"; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app28/SpringDocApp28Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app28/SpringDocApp28Test.java new file mode 100644 index 000000000..b4df527c2 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app28/SpringDocApp28Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app28; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp28Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app29/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app29/HelloController.java similarity index 56% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app29/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app29/HelloController.java index 24ddb0040..1cea1b380 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app29/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app29/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app29; +package test.org.springdoc.api.v30.app29; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app29/SpringDocApp29Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app29/SpringDocApp29Test.java new file mode 100644 index 000000000..9e27b8a79 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app29/SpringDocApp29Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app29; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp29Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app29/TrackerData.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app29/TrackerData.java new file mode 100644 index 000000000..086ce7899 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app29/TrackerData.java @@ -0,0 +1,45 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app29; + +import java.time.Instant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +@Schema(name = "TrackerData") +public class TrackerData { + + @Schema(name = "trackerId", type = "string", required = true, example = "the-tracker-id") + @JsonProperty("trackerId") + String trackerId; + + @Schema(name = "timestamp", type = "string", format = "date-time", required = true, example = "2018-01-01T00:00:00Z") + @JsonProperty("timestamp") + Instant timestamp; + + @Schema(name = "value", type = "number", format = "double", description = "The data value", required = true, example = "19.0") + @JsonProperty("value") + Double value; + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app30/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app30/HelloController.java new file mode 100644 index 000000000..7afdd55a2 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app30/HelloController.java @@ -0,0 +1,38 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app30; + +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping(produces = MediaType.TEXT_PLAIN_VALUE, path = "/test") + public String echo(@RequestParam(name = "text", defaultValue = "Hello, World!") String text) { + return text; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app30/SpringDocApp30Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app30/SpringDocApp30Test.java new file mode 100644 index 000000000..8fe016bfe --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app30/SpringDocApp30Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app30; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp30Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app31/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app31/HelloController.java similarity index 74% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app31/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app31/HelloController.java index df4a41e62..822e0964e 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app31/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app31/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app31; +package test.org.springdoc.api.v30.app31; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app31/SpringDocApp31Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app31/SpringDocApp31Test.java new file mode 100644 index 000000000..80575f99a --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app31/SpringDocApp31Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app31; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp31Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app32/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app32/HelloController.java new file mode 100644 index 000000000..4551886da --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app32/HelloController.java @@ -0,0 +1,50 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app32; + +import io.swagger.v3.oas.annotations.parameters.RequestBody; + +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @RequestMapping(value = "/filter", method = RequestMethod.POST) + @ResponseStatus(value = HttpStatus.OK) + public String filterPost(@RequestBody final MyTestDto filter) { + return "OK"; + } + + class MyTestDto { + public String object1; + + public String object2; + + public String object3; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app32/SpringDocApp32Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app32/SpringDocApp32Test.java new file mode 100644 index 000000000..dc157d5f5 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app32/SpringDocApp32Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app32; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp32Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app33/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app33/HelloController.java new file mode 100644 index 000000000..5ddc79889 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app33/HelloController.java @@ -0,0 +1,40 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app33; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.responses.ApiResponse; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping(value = "/hello/{numTelco}") + @Operation(summary = "GET Persons", responses = @ApiResponse(responseCode = "418")) + public T index(@PathVariable("numTelco") String numTel, String adresse) { + return null; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app33/SpringDocApp33Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app33/SpringDocApp33Test.java new file mode 100644 index 000000000..91908ef3a --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app33/SpringDocApp33Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app33; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp33Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app34/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app34/HelloController.java new file mode 100644 index 000000000..8a13296ca --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app34/HelloController.java @@ -0,0 +1,40 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app34; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.responses.ApiResponse; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping(value = "/hello/{numTelco}") + @Operation(summary = "GET Persons", responses = @ApiResponse(responseCode = "418")) + public T index(@PathVariable("numTelco") String numTel, String adresse) { + return null; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app34/MyExceptionHandler.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app34/MyExceptionHandler.java similarity index 50% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app34/MyExceptionHandler.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app34/MyExceptionHandler.java index f9d00d0c8..77f4731b2 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app34/MyExceptionHandler.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app34/MyExceptionHandler.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app34; +package test.org.springdoc.api.v30.app34; import io.swagger.v3.oas.annotations.Hidden; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app34/SpringDocApp34Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app34/SpringDocApp34Test.java new file mode 100644 index 000000000..507b77a48 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app34/SpringDocApp34Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app34; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp34Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app35/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app35/HelloController.java similarity index 68% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app35/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app35/HelloController.java index 9b3ae60e0..fa7e15ad2 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app35/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app35/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app35; +package test.org.springdoc.api.v30.app35; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app35/SpringDocApp35Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app35/SpringDocApp35Test.java new file mode 100644 index 000000000..afe17ff71 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app35/SpringDocApp35Test.java @@ -0,0 +1,39 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app35; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +import static org.springdoc.core.SpringDocUtils.getConfig; + +public class SpringDocApp35Test extends AbstractSpringDocV30Test { + + static { + getConfig().addRestControllers(HelloController.class); + } + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app36/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app36/HelloController.java new file mode 100644 index 000000000..619085a31 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app36/HelloController.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app36; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping("/persons") + public String persons() { + return "OK"; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app36/SpringDocApp36Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app36/SpringDocApp36Test.java similarity index 60% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app36/SpringDocApp36Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app36/SpringDocApp36Test.java index 9f2bf63f0..70737ba78 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app36/SpringDocApp36Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app36/SpringDocApp36Test.java @@ -1,26 +1,30 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app36; +package test.org.springdoc.api.v30.app36; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.test.context.TestPropertySource; @@ -34,7 +38,7 @@ @TestPropertySource(properties = { "springdoc.show-actuator=true", "management.endpoints.enabled-by-default=true", "management.endpoints.web.exposure.include=*"}) -public class SpringDocApp36Test extends AbstractSpringDocTest { +public class SpringDocApp36Test extends AbstractSpringDocV30Test { @Test public void testApp() throws Exception { diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/Bar.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/Bar.java new file mode 100644 index 000000000..5aaa75a42 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/Bar.java @@ -0,0 +1,27 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app37; + +public class Bar { + public String bar = "bar"; +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/Car.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/Car.java new file mode 100644 index 000000000..4fa05665e --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/Car.java @@ -0,0 +1,28 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app37; + +public class Car { + public String car = "car"; + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/Foo.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/Foo.java new file mode 100644 index 000000000..6106fbe29 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/Foo.java @@ -0,0 +1,27 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app37; + +public class Foo { + public String foo = "foo"; +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/HelloController.java similarity index 62% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/HelloController.java index 656576949..4607895bf 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app37/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app37; +package test.org.springdoc.api.v30.app37; import javax.validation.Valid; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/Pet.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/Pet.java new file mode 100644 index 000000000..dcf04a5c7 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/Pet.java @@ -0,0 +1,28 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app37; + +public class Pet { + public String pet = "pet"; + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/SpringDocApp37Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/SpringDocApp37Test.java new file mode 100644 index 000000000..78650f699 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app37/SpringDocApp37Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app37; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp37Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app38/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app38/HelloController.java new file mode 100644 index 000000000..29ca3760b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app38/HelloController.java @@ -0,0 +1,39 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app38; + +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +@RestController("/api") +public class HelloController { + + @RequestMapping(value = "/npe_error", method = RequestMethod.GET) + public ResponseEntity getModelResource() { + return new ResponseEntity<>(new byte[0], HttpStatus.OK); + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app38/SpringDocApp38Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app38/SpringDocApp38Test.java new file mode 100644 index 000000000..4e4205058 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app38/SpringDocApp38Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app38; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp38Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app39/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app39/HelloController.java new file mode 100644 index 000000000..01b0afb95 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app39/HelloController.java @@ -0,0 +1,47 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app39; + +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.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @Operation(summary = "test Request") + @RequestBody(description = "test value", required = true, content = @Content(schema = @Schema(implementation = String.class))) + @PostMapping("/test") + public void searchEmployee(String test) { + } + + @GetMapping("/hello") + public String hello() { + return "hello"; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app39/SpringDocApp39Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app39/SpringDocApp39Test.java new file mode 100644 index 000000000..7a8b698fe --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app39/SpringDocApp39Test.java @@ -0,0 +1,30 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app39; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +public class SpringDocApp39Test extends AbstractSpringDocV30Test { + + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app39/SpringDocTestApp.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app39/SpringDocTestApp.java similarity index 60% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app39/SpringDocTestApp.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app39/SpringDocTestApp.java index 0f42f4a7d..ca73d8cb7 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app39/SpringDocTestApp.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app39/SpringDocTestApp.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app39; +package test.org.springdoc.api.v30.app39; import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.OpenAPI; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app4/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app4/HelloController.java new file mode 100644 index 000000000..51788dcfc --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app4/HelloController.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app4; + +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @PostMapping(value = "/values/data") + TrackerData list(TrackerData toto) { + return toto; + + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app4/SpringDocApp4Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app4/SpringDocApp4Test.java new file mode 100644 index 000000000..dfca9cb2a --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app4/SpringDocApp4Test.java @@ -0,0 +1,42 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app4; + +import io.swagger.v3.core.jackson.TypeNameResolver; +import org.junit.jupiter.api.AfterAll; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; + +@TestPropertySource(properties = "springdoc.use-fqn=true") +public class SpringDocApp4Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + + @AfterAll + static void restore(){ + TypeNameResolver.std.setUseFqn(false); + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app4/TrackerData.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app4/TrackerData.java new file mode 100644 index 000000000..31fa6bcbb --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app4/TrackerData.java @@ -0,0 +1,44 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app4; + +import java.time.Instant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +public class TrackerData { + + @Schema(name = "trackerId", type = "string", required = true, example = "the-tracker-id") + @JsonProperty("trackerId") + String trackerId; + + @Schema(name = "timestamp", type = "string", format = "date-time", required = true, example = "2018-01-01T00:00:00Z") + @JsonProperty("timestamp") + Instant timestamp; + + @Schema(name = "value", type = "number", format = "double", description = "The data value", required = true, example = "19.0") + @JsonProperty("value") + Double value; + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app40/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app40/HelloController.java new file mode 100644 index 000000000..06471638d --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app40/HelloController.java @@ -0,0 +1,38 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app40; + +import com.fasterxml.jackson.databind.node.ObjectNode; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +@RestController("/api") +public class HelloController { + + @RequestMapping(value = "/iae_error", method = RequestMethod.GET) + public ObjectNode getStartFormProperties() { + return null; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app40/SpringDocApp40Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app40/SpringDocApp40Test.java new file mode 100644 index 000000000..c1b5a4349 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app40/SpringDocApp40Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app40; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp40Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app41/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app41/HelloController.java similarity index 67% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app41/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app41/HelloController.java index 72d11b29a..fb72e2196 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app41/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app41/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app41; +package test.org.springdoc.api.v30.app41; import javax.validation.Valid; import javax.validation.constraints.NotNull; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app41/SpringDocApp411Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app41/SpringDocApp411Test.java similarity index 61% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app41/SpringDocApp411Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app41/SpringDocApp411Test.java index c730321bb..1dff416d9 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app41/SpringDocApp411Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app41/SpringDocApp411Test.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app41; +package test.org.springdoc.api.v30.app41; import java.nio.file.Files; import java.nio.file.Path; @@ -24,7 +28,7 @@ import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.test.web.servlet.MvcResult; @@ -35,7 +39,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -public class SpringDocApp411Test extends AbstractSpringDocTest { +public class SpringDocApp411Test extends AbstractSpringDocV30Test { @Test public void testApp() throws Exception { @@ -47,7 +51,7 @@ public void testApp() throws Exception { mockMvcResult = mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))).andReturn(); String result = mockMvcResult.getResponse().getContentAsString(); - Path path = Paths.get(getClass().getClassLoader().getResource("results/app41.json").toURI()); + Path path = Paths.get(getClass().getClassLoader().getResource("results/3.0.1/app41.json").toURI()); byte[] fileBytes = Files.readAllBytes(path); String expected = new String(fileBytes); assertEquals(expected, result, false); diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app41/SpringDocApp41Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app41/SpringDocApp41Test.java similarity index 62% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app41/SpringDocApp41Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app41/SpringDocApp41Test.java index a1bb80319..89232321d 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app41/SpringDocApp41Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app41/SpringDocApp41Test.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app41; +package test.org.springdoc.api.v30.app41; import java.nio.file.Files; import java.nio.file.Path; @@ -24,7 +28,7 @@ import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.test.context.TestPropertySource; @@ -37,7 +41,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @TestPropertySource(properties = "springdoc.cache.disabled=true") -public class SpringDocApp41Test extends AbstractSpringDocTest { +public class SpringDocApp41Test extends AbstractSpringDocV30Test { @Test public void testApp() throws Exception { @@ -49,7 +53,7 @@ public void testApp() throws Exception { mockMvcResult = mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))).andReturn(); String result = mockMvcResult.getResponse().getContentAsString(); - Path path = Paths.get(getClass().getClassLoader().getResource("results/app" + testNumber + ".json").toURI()); + Path path = Paths.get(getClass().getClassLoader().getResource("results/3.0.1/app" + testNumber + ".json").toURI()); byte[] fileBytes = Files.readAllBytes(path); String expected = new String(fileBytes); assertEquals(expected, result, false); diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app42/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app42/HelloController.java new file mode 100644 index 000000000..9bfc1e90c --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app42/HelloController.java @@ -0,0 +1,38 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app42; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RestController; + + +@RestController("/api") +public class HelloController { + + @GetMapping(value = "/tweets") + public void tweets(@PathVariable TweetId id) { + + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app42/SpringDocApp42Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app42/SpringDocApp42Test.java new file mode 100644 index 000000000..2dedbb7c7 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app42/SpringDocApp42Test.java @@ -0,0 +1,43 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app42; + +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.media.StringSchema; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; + +public class SpringDocApp42Test extends AbstractSpringDocV30Test { + + + @SpringBootApplication + static class SpringDocTestApp { + @Bean + public OpenAPI customOpenAPI() { + return new OpenAPI().components(new Components().addSchemas("TweetId", new StringSchema())); + } + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app42/TweetId.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app42/TweetId.java new file mode 100644 index 000000000..5b2952b46 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app42/TweetId.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app42; + +public class TweetId { + private final String value; + + public TweetId(String value) { + this.value = value; + } + + public String getValue() { + return value; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app43/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app43/HelloController.java new file mode 100644 index 000000000..b3cd78ee7 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app43/HelloController.java @@ -0,0 +1,41 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app43; + +import java.util.List; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +@RestController +public class HelloController { + + @PostMapping(path = "/documents", consumes = "multipart/form-data") + public ResponseEntity uploadDocuments(@RequestPart("doc") List multipartFiles) { + return null; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app43/SpringDocApp43Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app43/SpringDocApp43Test.java new file mode 100644 index 000000000..cb41ad6ef --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app43/SpringDocApp43Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app43; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp43Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app44/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app44/HelloController.java similarity index 79% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app44/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app44/HelloController.java index 57e49226f..332c99b02 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app44/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app44/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app44; +package test.org.springdoc.api.v30.app44; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app44/SpringDocApp44Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app44/SpringDocApp44Test.java similarity index 62% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app44/SpringDocApp44Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app44/SpringDocApp44Test.java index 2e05cd40b..5d7195f04 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app44/SpringDocApp44Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app44/SpringDocApp44Test.java @@ -1,26 +1,30 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app44; +package test.org.springdoc.api.v30.app44; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -30,7 +34,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -public class SpringDocApp44Test extends AbstractSpringDocTest { +public class SpringDocApp44Test extends AbstractSpringDocV30Test { @Test public void testApp() throws Exception { diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app45/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app45/HelloController.java similarity index 69% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app45/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app45/HelloController.java index efb409e03..f8585f389 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app45/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app45/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app45; +package test.org.springdoc.api.v30.app45; import java.util.Collections; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app45/HelloController2.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app45/HelloController2.java similarity index 70% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app45/HelloController2.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app45/HelloController2.java index 460d9a21e..e79c14b35 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app45/HelloController2.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app45/HelloController2.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app45; +package test.org.springdoc.api.v30.app45; import java.util.Collections; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app45/OpenApiConfig.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app45/OpenApiConfig.java new file mode 100644 index 000000000..11ccaa997 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app45/OpenApiConfig.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app45; + +import io.swagger.v3.oas.annotations.OpenAPIDefinition; +import io.swagger.v3.oas.annotations.enums.SecuritySchemeType; +import io.swagger.v3.oas.annotations.info.Info; +import io.swagger.v3.oas.annotations.info.License; +import io.swagger.v3.oas.annotations.security.SecurityScheme; + +@OpenAPIDefinition(info = @Info(title = "My App", description = "Some long and useful description", version = "v1", license = @License(name = "Apache 2.0", url = "https://www.apache.org/licenses/LICENSE-2.0"))) +@SecurityScheme(name = "bearer", type = SecuritySchemeType.HTTP, scheme = "bearer", bearerFormat = "JWT") +public class OpenApiConfig { +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app45/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app45/PersonDTO.java new file mode 100644 index 000000000..3ec4d1b82 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app45/PersonDTO.java @@ -0,0 +1,64 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app45; + +public class PersonDTO { + private String email; + + private String firstName; + + private String lastName; + + public PersonDTO() { + } + + public PersonDTO(final String email, final String firstName, final String lastName) { + this.email = email; + this.firstName = firstName; + this.lastName = lastName; + } + + public String getEmail() { + return email; + } + + public void setEmail(final String email) { + this.email = email; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(final String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(final String lastName) { + this.lastName = lastName; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app45/SpringDocApp45Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app45/SpringDocApp45Test.java new file mode 100644 index 000000000..742fcffbf --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app45/SpringDocApp45Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app45; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp45Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app46/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app46/HelloController.java similarity index 64% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app46/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app46/HelloController.java index 0e972c3e0..703a0a154 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app46/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app46/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app46; +package test.org.springdoc.api.v30.app46; import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app46/SpringDocApp46Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app46/SpringDocApp46Test.java new file mode 100644 index 000000000..14233c56a --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app46/SpringDocApp46Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app46; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp46Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app47/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app47/HelloController.java new file mode 100644 index 000000000..e8dfa9a91 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app47/HelloController.java @@ -0,0 +1,42 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app47; + +import java.util.Locale; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + @GetMapping(path = "/documents/{locale}") + public ResponseEntity getDocumentsWithLocale( + @Parameter(schema = @Schema(type = "string")) @PathVariable("locale") Locale locale) { + return null; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app47/SpringDocApp47Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app47/SpringDocApp47Test.java new file mode 100644 index 000000000..fb1061959 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app47/SpringDocApp47Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app47; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp47Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app48/AbstractHelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app48/AbstractHelloController.java new file mode 100644 index 000000000..24d9488aa --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app48/AbstractHelloController.java @@ -0,0 +1,46 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app48; + +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; + +@ApiResponse(responseCode = "410") +@ApiResponses({ + @ApiResponse(responseCode = "411") +}) +public class AbstractHelloController { + + @GetMapping(path = "/documents/{locale}") + @ApiResponse(responseCode = "412") + @ApiResponses({ + @ApiResponse(responseCode = "413") + }) + public ResponseEntity getDocuments() { + return null; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app48/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app48/HelloController.java new file mode 100644 index 000000000..3b04bf230 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app48/HelloController.java @@ -0,0 +1,49 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app48; + +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController + +@ApiResponse(responseCode = "400") +@ApiResponses({ + @ApiResponse(responseCode = "401") +}) +public class HelloController extends AbstractHelloController { + + @Override + @GetMapping(path = "/documents/{locale}") + @ApiResponse(responseCode = "402") + @ApiResponses({ + @ApiResponse(responseCode = "403") + }) + public ResponseEntity getDocuments() { + return null; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app48/SpringDocApp48Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app48/SpringDocApp48Test.java new file mode 100644 index 000000000..b385a4369 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app48/SpringDocApp48Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app48; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp48Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app49/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app49/HelloController.java new file mode 100644 index 000000000..b7e1b2601 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app49/HelloController.java @@ -0,0 +1,45 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app49; + +import java.util.List; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; + +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @Operation(description = "Obtain the list of services available in the system") + @ApiResponses({ @ApiResponse(responseCode = "401", ref = "Unauthorized") }) + @GetMapping(value = "/hello", produces = MediaType.APPLICATION_JSON_VALUE) + List list() { + return null; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app49/SpringDocApp49Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app49/SpringDocApp49Test.java new file mode 100644 index 000000000..7897737bd --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app49/SpringDocApp49Test.java @@ -0,0 +1,30 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app49; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +public class SpringDocApp49Test extends AbstractSpringDocV30Test { + + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app49/SpringDocTestApp.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app49/SpringDocTestApp.java similarity index 56% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app49/SpringDocTestApp.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app49/SpringDocTestApp.java index 6cf645f30..118f72673 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app49/SpringDocTestApp.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app49/SpringDocTestApp.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app49; +package test.org.springdoc.api.v30.app49; import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.OpenAPI; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app5/CustomOpenAPIConfig.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app5/CustomOpenAPIConfig.java new file mode 100644 index 000000000..7dc1ac846 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app5/CustomOpenAPIConfig.java @@ -0,0 +1,39 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app5; + +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.tags.Tag; + +import org.springframework.context.annotation.Bean; + +public class CustomOpenAPIConfig { + @Bean + public OpenAPI customOpenAPI() { + return new OpenAPI() + .components(new Components()) + .info(new Info().title("Custom API").version("100")).addTagsItem(new Tag().name("mytag")); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app5/sample/OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest.java similarity index 84% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app5/sample/OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest.java index e7b7f487a..3b7e9e406 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app5/sample/OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app5.sample; +package test.org.springdoc.api.v30.app5.sample; import java.util.ArrayList; @@ -28,7 +32,7 @@ import io.swagger.v3.oas.models.security.SecurityRequirement; import io.swagger.v3.oas.models.security.SecurityScheme; import org.junit.jupiter.api.Test; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.test.context.TestConfiguration; @@ -41,7 +45,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @TestPropertySource(properties = "springdoc.api-docs.path=/api-docs") -public class OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest extends AbstractSpringDocTest { +public class OpenAPIResourceBeanConfigurationComponentsSecuritySchemesTest extends AbstractSpringDocV30Test { /** * Given: Bean configuration with security scheme http basic (shouldDefineComponentsSecuritySchemesForHttpBasic) diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app5/sample/OpenApiResourceCustomConfigurationTest.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenApiResourceCustomConfigurationTest.java similarity index 60% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app5/sample/OpenApiResourceCustomConfigurationTest.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenApiResourceCustomConfigurationTest.java index 815184642..1f6ad7e01 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app5/sample/OpenApiResourceCustomConfigurationTest.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenApiResourceCustomConfigurationTest.java @@ -1,26 +1,30 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app5.sample; +package test.org.springdoc.api.v30.app5.sample; import org.junit.jupiter.api.Test; -import test.org.springdoc.api.AbstractSpringDocTest; -import test.org.springdoc.api.app5.CustomOpenAPIConfig; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; +import test.org.springdoc.api.v30.app5.CustomOpenAPIConfig; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Import; @@ -33,7 +37,7 @@ @Import(CustomOpenAPIConfig.class) @TestPropertySource(properties = "springdoc.api-docs.path=/api-docs") -public class OpenApiResourceCustomConfigurationTest extends AbstractSpringDocTest { +public class OpenApiResourceCustomConfigurationTest extends AbstractSpringDocV30Test { /** * givenNoConfiguration_whenGetApiJson_returnsDefaultEmptyDocs - should return diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app5/sample/OpenApiResourceNoConfigurationTest.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenApiResourceNoConfigurationTest.java similarity index 59% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app5/sample/OpenApiResourceNoConfigurationTest.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenApiResourceNoConfigurationTest.java index 53e7479e7..e42e1d030 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app5/sample/OpenApiResourceNoConfigurationTest.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app5/sample/OpenApiResourceNoConfigurationTest.java @@ -1,25 +1,29 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app5.sample; +package test.org.springdoc.api.v30.app5.sample; import org.junit.jupiter.api.Test; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.test.context.TestPropertySource; @@ -30,7 +34,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @TestPropertySource(properties = "springdoc.api-docs.path=/api-docs") -public class OpenApiResourceNoConfigurationTest extends AbstractSpringDocTest { +public class OpenApiResourceNoConfigurationTest extends AbstractSpringDocV30Test { /** * givenNoConfiguration_whenGetApiJson_returnsDefaultEmptyDocs - should return diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app50/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app50/HelloController.java new file mode 100644 index 000000000..e8d69e7f7 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app50/HelloController.java @@ -0,0 +1,44 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app50; + +import java.util.List; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.responses.ApiResponse; + +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @Operation(description = "Some operation", responses = { @ApiResponse(responseCode = "401") }) + //@ApiResponse(responseCode = "401", content = @Content()) + @GetMapping(value = "/hello", produces = MediaType.APPLICATION_JSON_VALUE) + List list() { + return null; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app50/SpringDocApp50Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app50/SpringDocApp50Test.java new file mode 100644 index 000000000..cee2296cf --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app50/SpringDocApp50Test.java @@ -0,0 +1,30 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app50; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +public class SpringDocApp50Test extends AbstractSpringDocV30Test { + + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app50/SpringDocTestApp.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app50/SpringDocTestApp.java similarity index 56% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app50/SpringDocTestApp.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app50/SpringDocTestApp.java index c310dc865..f7b6de335 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app50/SpringDocTestApp.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app50/SpringDocTestApp.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app50; +package test.org.springdoc.api.v30.app50; import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.OpenAPI; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app51/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app51/HelloController.java similarity index 72% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app51/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app51/HelloController.java index dd81c6f45..218c34c24 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app51/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app51/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app51; +package test.org.springdoc.api.v30.app51; import java.util.HashMap; import java.util.Map; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app51/SpringDocApp51Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app51/SpringDocApp51Test.java new file mode 100644 index 000000000..2474eb61c --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app51/SpringDocApp51Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app51; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp51Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app52/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app52/HelloController.java similarity index 61% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app52/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app52/HelloController.java index 017228ea5..c1cb343f0 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app52/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app52/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app52; +package test.org.springdoc.api.v30.app52; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app52/SpringDocApp52Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app52/SpringDocApp52Test.java new file mode 100644 index 000000000..e5a2bd015 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app52/SpringDocApp52Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app52; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp52Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app53/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app53/HelloController.java similarity index 72% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app53/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app53/HelloController.java index 312eb5f60..411ba4a06 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app53/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app53/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app53; +package test.org.springdoc.api.v30.app53; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app53/HelloControllerWithGlobalApiResponse.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app53/HelloControllerWithGlobalApiResponse.java similarity index 60% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app53/HelloControllerWithGlobalApiResponse.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app53/HelloControllerWithGlobalApiResponse.java index 966189166..7443569a0 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app53/HelloControllerWithGlobalApiResponse.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app53/HelloControllerWithGlobalApiResponse.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app53; +package test.org.springdoc.api.v30.app53; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app53/SpringDocApp53Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app53/SpringDocApp53Test.java new file mode 100644 index 000000000..299dff910 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app53/SpringDocApp53Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app53; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp53Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app54/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app54/HelloController.java similarity index 64% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app54/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app54/HelloController.java index 228a81ddf..63ec67dad 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app54/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app54/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app54; +package test.org.springdoc.api.v30.app54; import com.fasterxml.jackson.annotation.JsonView; import io.swagger.v3.oas.annotations.Operation; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app54/MealParty.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app54/MealParty.java new file mode 100644 index 000000000..24d229053 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app54/MealParty.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app54; + +import java.util.ArrayList; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonView; + +public class MealParty { + @JsonView(Views.Public.class) + private String name; + + @JsonView(Views.MealPartyAdmin.class) + private List members = new ArrayList<>(); +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app54/SpringDocApp54Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app54/SpringDocApp54Test.java new file mode 100644 index 000000000..ceb5a3404 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app54/SpringDocApp54Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app54; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp54Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app54/Views.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app54/Views.java new file mode 100644 index 000000000..b6d71b6e1 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app54/Views.java @@ -0,0 +1,31 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app54; + +public interface Views { + public interface Public { + } + + public interface MealPartyAdmin extends Public { + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app55/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app55/HelloController.java similarity index 55% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app55/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app55/HelloController.java index 769bda7bb..df3eb2789 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app55/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app55/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app55; +package test.org.springdoc.api.v30.app55; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.responses.ApiResponse; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app55/SpringDocApp55Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app55/SpringDocApp55Test.java new file mode 100644 index 000000000..f0a8ebf86 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app55/SpringDocApp55Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app55; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp55Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app56/GlobalExceptionHandler.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app56/GlobalExceptionHandler.java similarity index 58% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app56/GlobalExceptionHandler.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app56/GlobalExceptionHandler.java index a1ba8f585..6138f7a09 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app56/GlobalExceptionHandler.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app56/GlobalExceptionHandler.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app56; +package test.org.springdoc.api.v30.app56; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app56/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app56/HelloController.java new file mode 100644 index 000000000..991b144bf --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app56/HelloController.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app56; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping("/persons") + public String persons() { + return "OK"; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app56/SpringDocApp56Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app56/SpringDocApp56Test.java new file mode 100644 index 000000000..6ab03960e --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app56/SpringDocApp56Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app56; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp56Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app57/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app57/HelloController.java new file mode 100644 index 000000000..ac01bd17b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app57/HelloController.java @@ -0,0 +1,40 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app57; + +import io.swagger.v3.oas.annotations.Parameter; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping("/{name:.+}") + public ResponseEntity getText(@Parameter(description = "desc", required = true) @PathVariable String name) { + return null; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app57/SpringDocApp57Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app57/SpringDocApp57Test.java new file mode 100644 index 000000000..eef3e8682 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app57/SpringDocApp57Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app57; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp57Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app58/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app58/HelloController.java similarity index 71% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app58/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app58/HelloController.java index ecb7e6ca6..fe4d392ac 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app58/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app58/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app58; +package test.org.springdoc.api.v30.app58; import com.fasterxml.jackson.databind.JsonNode; import io.swagger.v3.oas.annotations.Operation; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app58/SpringDocApp58Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app58/SpringDocApp58Test.java new file mode 100644 index 000000000..f8bcee203 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app58/SpringDocApp58Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app58; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp58Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app59/HelloBody.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app59/HelloBody.java new file mode 100644 index 000000000..49290148e --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app59/HelloBody.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app59; + +import javax.validation.constraints.NotNull; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class HelloBody { + + @NotNull + @JsonProperty + private String helloValue; + + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app59/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app59/HelloController.java new file mode 100644 index 000000000..f0e911775 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app59/HelloController.java @@ -0,0 +1,45 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app59; + +import io.swagger.v3.oas.annotations.responses.ApiResponse; + +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + @Deprecated + @GetMapping("/example") + public void test() { + } + + @PostMapping("/hello") + @ApiResponse(responseCode = "200", description = "The server accepted your hello.") + String hello(@Validated @RequestBody final HelloBody helloBody) { + return "World!"; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app59/HelloController2.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app59/HelloController2.java new file mode 100644 index 000000000..d278fb693 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app59/HelloController2.java @@ -0,0 +1,46 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app59; + +import io.swagger.v3.oas.annotations.responses.ApiResponse; + +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@Deprecated +public class HelloController2 { + + @GetMapping("/example2") + public void test() { + } + + @PostMapping("/hello2") + @ApiResponse(responseCode = "200", description = "The server accepted your hello.") + String hello(@Validated @RequestBody final HelloBody helloBody) { + return "World!"; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app59/HelloExceptionHandler.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app59/HelloExceptionHandler.java similarity index 63% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app59/HelloExceptionHandler.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app59/HelloExceptionHandler.java index 384293c09..ced2a8ffe 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app59/HelloExceptionHandler.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app59/HelloExceptionHandler.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app59; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app59; import io.swagger.v3.oas.annotations.responses.ApiResponse; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app59/SpringDocApp59Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app59/SpringDocApp59Test.java new file mode 100644 index 000000000..e0f141a12 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app59/SpringDocApp59Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app59; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp59Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app6/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app6/HelloController.java similarity index 59% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app6/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app6/HelloController.java index 03ce2238c..dcdce7549 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app6/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app6/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app6; +package test.org.springdoc.api.v30.app6; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app6/SpringDocApp6Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app6/SpringDocApp6Test.java new file mode 100644 index 000000000..1ba0d137b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app6/SpringDocApp6Test.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app6; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp6Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app60/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app60/HelloController.java similarity index 50% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app60/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app60/HelloController.java index 7d2a5dd6a..05f828823 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app60/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app60/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app60; +package test.org.springdoc.api.v30.app60; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app60/QueryPaging.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app60/QueryPaging.java new file mode 100644 index 000000000..4aa9aadbb --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app60/QueryPaging.java @@ -0,0 +1,40 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app60; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; + +@Retention(RetentionPolicy.RUNTIME) +@Target({ ElementType.METHOD }) +@Parameters({ + @Parameter(name = "page", description = "desc page from Annotated interface"), + @Parameter(name = "size", description = "desc page from Annotated interface") +}) +public @interface QueryPaging { +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app60/QuerySort.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app60/QuerySort.java new file mode 100644 index 000000000..f9fa0c0fe --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app60/QuerySort.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app60; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import io.swagger.v3.oas.annotations.Parameter; + +@Retention(RetentionPolicy.RUNTIME) +@Target({ ElementType.METHOD }) +@Parameter(name = "sort", description = "desc sort from Annotated interface") +public @interface QuerySort { +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app60/SpringDocApp60Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app60/SpringDocApp60Test.java new file mode 100644 index 000000000..8b868ae2f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app60/SpringDocApp60Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app60; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp60Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app61/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app61/HelloController.java similarity index 60% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app61/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app61/HelloController.java index 5398978f4..fa2c60d43 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app61/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app61/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app61; +package test.org.springdoc.api.v30.app61; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app61/SpringDocApp61Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app61/SpringDocApp61Test.java new file mode 100644 index 000000000..a2c149db9 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app61/SpringDocApp61Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app61; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp61Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app62/BaseController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app62/BaseController.java new file mode 100644 index 000000000..3966113aa --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app62/BaseController.java @@ -0,0 +1,45 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app62; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import org.springframework.core.annotation.AliasFor; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@Target({ ElementType.METHOD, ElementType.TYPE }) +@Retention(RetentionPolicy.RUNTIME) +@RestController +@RequestMapping +public @interface BaseController { + @AliasFor(annotation = RequestMapping.class) + String[] value() default {}; + + @AliasFor(annotation = RequestMapping.class) + String[] produces() default { MediaType.APPLICATION_XML_VALUE, MediaType.APPLICATION_JSON_VALUE }; +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app62/SpringDocApp62Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app62/SpringDocApp62Test.java new file mode 100644 index 000000000..f77623fa7 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app62/SpringDocApp62Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app62; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp62Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app62/TestController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app62/TestController.java new file mode 100644 index 000000000..ca8bc815a --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app62/TestController.java @@ -0,0 +1,41 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app62; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; + +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +@BaseController +@Tag(name = "Test Controller") +public class TestController { + + @RequestMapping(value = "/test", method = RequestMethod.GET) + @Operation(summary = "This is the test endpoint") + public String test(@RequestHeader("Accept") String accept) { + return "This is a test"; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app63/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app63/HelloController.java new file mode 100644 index 000000000..9959eefd5 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app63/HelloController.java @@ -0,0 +1,42 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app63; + +import java.util.Locale; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping("/test") + public void test(HttpSession header, HttpServletRequest request, HttpServletResponse response, Locale locale, + String hello) { + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app63/SpringDocApp63Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app63/SpringDocApp63Test.java new file mode 100644 index 000000000..68add178e --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app63/SpringDocApp63Test.java @@ -0,0 +1,38 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app63; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; + + +@TestPropertySource(properties = { + "springdoc.packagesToScan=hell,hello1, hello.me", + "springdoc.packagesToExclude=test.org.springdoc.api.app63.65" }) +public class SpringDocApp63Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app64/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app64/HelloController.java new file mode 100644 index 000000000..4db6f76e0 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app64/HelloController.java @@ -0,0 +1,43 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app64; + +import io.swagger.v3.oas.annotations.Operation; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping("/v1/test") + public void test1(String hello) { + } + + @GetMapping(value = "/api/balance/abcd") + @Operation(summary = "This is the test endpoint") + public String test2(String from) { + return "This is a fake test"; + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app64/SpringDocApp64Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app64/SpringDocApp64Test.java new file mode 100644 index 000000000..cd2f1d1bf --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app64/SpringDocApp64Test.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app64; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; + +@TestPropertySource(properties = "springdoc.paths-to-match=/v1, /api/**") +public class SpringDocApp64Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app65/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app65/HelloController.java new file mode 100644 index 000000000..623be3b39 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app65/HelloController.java @@ -0,0 +1,43 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app65; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; + +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@Tag(name = "Health", description = "Health check / ping API") +@RestController +public class HelloController { + + @Operation(summary = "Check server status", description = "Check server status, will return 200 with simple string if alive. Do nothing else.") + @GetMapping(value = { "/ping", "/health", "/" }, produces = MediaType.TEXT_PLAIN_VALUE) + public ResponseEntity ping() { + return ResponseEntity.ok("Healthy"); + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app65/SpringDocApp65Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app65/SpringDocApp65Test.java new file mode 100644 index 000000000..f3ed62094 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app65/SpringDocApp65Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app65; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp65Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app66/DefaultHealthCheckApi.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app66/DefaultHealthCheckApi.java new file mode 100644 index 000000000..4b0a9fe72 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app66/DefaultHealthCheckApi.java @@ -0,0 +1,44 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app66; + +import java.time.LocalDate; + +import io.swagger.v3.oas.annotations.Hidden; + +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RestController; + + +@RestController +@Hidden +public class DefaultHealthCheckApi { + + @GetMapping("/test/date/echo/{date}") + public String testDateEcho(@DateTimeFormat(pattern = "yyyyMMdd") @PathVariable LocalDate date) { + return date.toString(); + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app66/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app66/HelloController.java similarity index 50% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app66/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app66/HelloController.java index f2afff9f9..da94747f3 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app66/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app66/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app66; +package test.org.springdoc.api.v30.app66; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app66/SpringDocApp66Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app66/SpringDocApp66Test.java new file mode 100644 index 000000000..ad17dd93f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app66/SpringDocApp66Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app66; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp66Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app66/UndocumentedClass.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app66/UndocumentedClass.java new file mode 100644 index 000000000..0d1740730 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app66/UndocumentedClass.java @@ -0,0 +1,30 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app66; + +import io.swagger.v3.oas.annotations.Hidden; + +@Hidden +public class UndocumentedClass { + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app67/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app67/HelloController.java similarity index 78% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app67/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app67/HelloController.java index e77fd0ea1..5787a6656 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app67/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app67/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app67; +package test.org.springdoc.api.v30.app67; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app67/SpringDocApp67Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app67/SpringDocApp67Test.java new file mode 100644 index 000000000..d709f1e3e --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app67/SpringDocApp67Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app67; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp67Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/CustomizedOperation.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/CustomizedOperation.java new file mode 100644 index 000000000..c3bec98b6 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/CustomizedOperation.java @@ -0,0 +1,31 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app68; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Retention(RetentionPolicy.RUNTIME) +public @interface CustomizedOperation { + String addition() default "customized operation!"; +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/SpringDocApp68Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/SpringDocApp68Test.java similarity index 71% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/SpringDocApp68Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/SpringDocApp68Test.java index 9062b2596..ebf648d77 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/SpringDocApp68Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/SpringDocApp68Test.java @@ -1,27 +1,31 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app68; +package test.org.springdoc.api.v30.app68; import org.hamcrest.Matchers; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.test.context.TestPropertySource; @@ -35,7 +39,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @TestPropertySource(properties = { "management.endpoints.enabled-by-default=true", "springdoc.show-actuator=true" } ) -public class SpringDocApp68Test extends AbstractSpringDocTest { +public class SpringDocApp68Test extends AbstractSpringDocV30Test { public static String className; @@ -44,7 +48,7 @@ public void testApp() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/stores")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app68-1.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app68-1.json"), true)); } @Test @@ -52,7 +56,7 @@ public void testApp2() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/users")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app68-2.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app68-2.json"), true)); } @Test @@ -60,7 +64,7 @@ public void testApp3() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/pets")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app68-3.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app68-3.json"), true)); } @Test @@ -68,7 +72,7 @@ public void testApp4() throws Exception { mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL + "/groups test")) .andExpect(status().isOk()) .andExpect(jsonPath("$.openapi", is("3.0.1"))) - .andExpect(content().json(getContent("results/app68-4.json"), true)); + .andExpect(content().json(getContent("results/3.0.1/app68-4.json"), true)); } @Test diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/SpringDocTestApp.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/SpringDocTestApp.java similarity index 76% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/SpringDocTestApp.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/SpringDocTestApp.java index b8f1ce9fb..a78fc1e61 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/SpringDocTestApp.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/SpringDocTestApp.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app68; +package test.org.springdoc.api.v30.app68; import java.util.ArrayList; import java.util.List; @@ -57,7 +61,7 @@ public GroupedOpenApi storeOpenApi() { public GroupedOpenApi userOpenApi() { return GroupedOpenApi.builder() .group("users") - .packagesToScan("test.org.springdoc.api.app68.api.user").addOpenApiCustomiser(serverOpenApiCustomiser1()) + .packagesToScan("test.org.springdoc.api.v30.app68.api.user").addOpenApiCustomiser(serverOpenApiCustomiser1()) .addOperationCustomizer(operationCustomizer()) .build(); } @@ -99,7 +103,7 @@ public GroupedOpenApi groupOpenApi() { return GroupedOpenApi.builder() .group("groups test") .pathsToMatch("/v1/**").pathsToExclude("/v1/users") - .packagesToScan("test.org.springdoc.api.app68.api.user", "test.org.springdoc.api.app68.api.store") + .packagesToScan("test.org.springdoc.api.v30.app68.api.user", "test.org.springdoc.api.v30.app68.api.store") .build(); } diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/ApiUtil.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/ApiUtil.java similarity index 53% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/ApiUtil.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/ApiUtil.java index a64749c42..107da3ac1 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/ApiUtil.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/ApiUtil.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app68.api; +package test.org.springdoc.api.v30.app68.api; import java.io.IOException; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/ExceptionTranslator.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/ExceptionTranslator.java similarity index 60% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/ExceptionTranslator.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/ExceptionTranslator.java index 8beeef6a2..5c397dd36 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/ExceptionTranslator.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/ExceptionTranslator.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app68.api; +package test.org.springdoc.api.v30.app68.api; import java.util.Map; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/HomeController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/HomeController.java new file mode 100644 index 000000000..fe3bcb73e --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/HomeController.java @@ -0,0 +1,46 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app68.api; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; + +import static org.springdoc.core.Constants.SWAGGER_UI_PATH; +import static org.springframework.util.AntPathMatcher.DEFAULT_PATH_SEPARATOR; +import static org.springframework.web.servlet.view.UrlBasedViewResolver.REDIRECT_URL_PREFIX; + +/** + * Home redirection to swagger api documentation + */ +@Controller +public class HomeController { + + @Value(SWAGGER_UI_PATH) + private String swaggerUiPath; + + @GetMapping(DEFAULT_PATH_SEPARATOR) + public String index() { + return REDIRECT_URL_PREFIX + swaggerUiPath; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/pet/PetApi.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/pet/PetApi.java new file mode 100644 index 000000000..c843af30b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/pet/PetApi.java @@ -0,0 +1,166 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.0). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package test.org.springdoc.api.v30.app68.api.pet; + +import java.util.List; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.enums.SecuritySchemeType; +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.v3.oas.annotations.responses.ApiResponses; +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 io.swagger.v3.oas.annotations.tags.Tag; +import test.org.springdoc.api.v30.app68.model.ModelApiResponse; +import test.org.springdoc.api.v30.app68.model.Pet; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; + +@SecurityScheme(name = "petstore_auth", type = SecuritySchemeType.OAUTH2, flows = @OAuthFlows(implicit = @OAuthFlow(authorizationUrl = "http://petstore.swagger.io/oauth/dialog", scopes = { + @OAuthScope(name = "write:pets", description = "modify pets in your account"), + @OAuthScope(name = "read:pets", description = "read your pets") }))) +@Tag(name = "pet", description = "the pet API") +@ResponseBody +public interface PetApi { + + default PetApiDelegate getDelegate() { + return new PetApiDelegate() { + }; + } + + @Operation(summary = "Add a new pet to the store", description = "", security = { + @SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" }) }, tags = { "pet" }) + @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) + @PostMapping(value = "/pet", consumes = { "application/json", "application/xml" }) + default void addPet( + @io.swagger.v3.oas.annotations.parameters.RequestBody(description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet) { + // return getDelegate().addPet(pet); + } + + @Operation(summary = "Deletes a pet", description = "", security = { + @SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" }) }, tags = { "pet" }) + @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found") }) + @DeleteMapping(value = "/pet/{petId}") + default ResponseEntity deletePet( + @Parameter(description = "Pet id to delete", required = true) @PathVariable("petId") Long petId, + @Parameter(description = "") @RequestHeader(value = "api_key", required = false) String apiKey) { + return getDelegate().deletePet(petId, apiKey); + } + + @Operation(summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings", security = { + @SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" }) }, tags = { "pet" }) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "400", description = "Invalid status value") }) + @GetMapping(value = "/pet/findByStatus", produces = { "application/xml", "application/json" }) + default ResponseEntity> findPetsByStatus( + @NotNull @Parameter(description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List status) { + return getDelegate().findPetsByStatus(status); + } + + @Operation(summary = "Finds Pets by tags", description = "Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", security = { + @SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" }) }, tags = { "pet" }) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Pet.class)))), + @ApiResponse(responseCode = "400", description = "Invalid tag value") }) + @GetMapping(value = "/pet/findByTags", produces = { "application/xml", "application/json" }) + default ResponseEntity> findPetsByTags( + @NotNull @Parameter(description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List tags) { + return getDelegate().findPetsByTags(tags); + } + + @Operation(summary = "Find pet by ID", description = "Returns a single pet", security = { + @SecurityRequirement(name = "api_key") }, tags = { "pet" }) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Pet.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found") }) + @GetMapping(value = "/pet/{petId}", produces = { "application/xml", "application/json" }) + default ResponseEntity getPetById( + @Parameter(description = "ID of pet to return", required = true) @PathVariable("petId") Long petId) { + return getDelegate().getPetById(petId); + } + + @Operation(summary = "Update an existing pet", description = "", security = { + @SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" }) }, tags = { "pet" }) + @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Pet not found"), + @ApiResponse(responseCode = "405", description = "Validation exception") }) + @PutMapping(value = "/pet", consumes = { "application/json", "application/xml" }) + default ResponseEntity updatePet( + @io.swagger.v3.oas.annotations.parameters.RequestBody(description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet pet) { + return getDelegate().updatePet(pet); + } + + @Operation(summary = "Updates a pet in the store with form data", description = "", security = { + @SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" }) }, tags = { "pet" }) + @ApiResponses(value = { @ApiResponse(responseCode = "405", description = "Invalid input") }) + @PostMapping(value = "/pet/{petId}", consumes = { "application/x-www-form-urlencoded" }) + default ResponseEntity updatePetWithForm( + @Parameter(description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId, + @Parameter(description = "Updated name of the pet") @RequestParam(value = "name", required = false) String name, + @Parameter(description = "Updated status of the pet") @RequestParam(value = "status", required = false) String status) { + return getDelegate().updatePetWithForm(petId, name, status); + } + + @Operation(summary = "uploads an image", description = "", security = { + @SecurityRequirement(name = "petstore_auth", scopes = { "write:pets", "read:pets" }) }, tags = { "pet" }) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = ModelApiResponse.class))) }) + @PostMapping(value = "/pet/{petId}/uploadImage", produces = { "application/json" }, consumes = { + "multipart/form-data" }) + default ResponseEntity uploadFile( + @Parameter(description = "ID of pet to update", required = true) @PathVariable("petId") Long petId, + @Parameter(description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata, + @Parameter(description = "file detail") @Valid @RequestPart("file") MultipartFile file) { + return getDelegate().uploadFile(petId, additionalMetadata, file); + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/pet/PetApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/pet/PetApiController.java new file mode 100644 index 000000000..939925a58 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/pet/PetApiController.java @@ -0,0 +1,48 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app68.api.pet; + +import java.util.Optional; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") + +@RestController +@RequestMapping("${openapi.openAPIPetstore.base-path:/}") +public class PetApiController implements PetApi { + + private final PetApiDelegate delegate; + + public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() { + }); + } + + @Override + public PetApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/PetApiDelegate.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/pet/PetApiDelegate.java similarity index 78% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/PetApiDelegate.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/pet/PetApiDelegate.java index e1bcdc302..82a106e9d 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/PetApiDelegate.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/pet/PetApiDelegate.java @@ -1,30 +1,35 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app2.api; +package test.org.springdoc.api.v30.app68.api.pet; import java.util.List; import java.util.Optional; import javax.validation.Valid; -import test.org.springdoc.api.app2.model.ModelApiResponse; -import test.org.springdoc.api.app2.model.Pet; +import test.org.springdoc.api.v30.app68.api.ApiUtil; +import test.org.springdoc.api.v30.app68.model.ModelApiResponse; +import test.org.springdoc.api.v30.app68.model.Pet; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/pet/PetApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/pet/PetApiDelegateImpl.java new file mode 100644 index 000000000..0fc1c6f72 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/pet/PetApiDelegateImpl.java @@ -0,0 +1,31 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app68.api.pet; + +import org.springframework.stereotype.Service; + +@Service +public class PetApiDelegateImpl implements PetApiDelegate { + + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/store/StoreApi.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/store/StoreApi.java similarity index 82% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/store/StoreApi.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/store/StoreApi.java index ec1fa1065..f04000ed8 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/store/StoreApi.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/store/StoreApi.java @@ -1,18 +1,22 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ @@ -21,7 +25,7 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -package test.org.springdoc.api.app68.api.store; +package test.org.springdoc.api.v30.app68.api.store; import java.util.Map; @@ -39,7 +43,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; -import test.org.springdoc.api.app68.model.Order; +import test.org.springdoc.api.v30.app68.model.Order; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/store/StoreApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/store/StoreApiController.java new file mode 100644 index 000000000..78ec9ac3f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/store/StoreApiController.java @@ -0,0 +1,48 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app68.api.store; + +import java.util.Optional; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") + +@RestController +@RequestMapping("${openapi.openAPIPetstore.base-path:/}") +public class StoreApiController implements StoreApi { + + private final StoreApiDelegate delegate; + + public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() { + }); + } + + @Override + public StoreApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/store/StoreApiDelegate.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/store/StoreApiDelegate.java similarity index 71% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/store/StoreApiDelegate.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/store/StoreApiDelegate.java index fe317cc0c..d15031296 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/store/StoreApiDelegate.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/store/StoreApiDelegate.java @@ -1,28 +1,32 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app105.api.store; +package test.org.springdoc.api.v30.app68.api.store; import java.util.Map; import java.util.Optional; -import test.org.springdoc.api.app105.api.ApiUtil; -import test.org.springdoc.api.app105.model.Order; +import test.org.springdoc.api.v30.app68.api.ApiUtil; +import test.org.springdoc.api.v30.app68.model.Order; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/store/StoreApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/store/StoreApiDelegateImpl.java new file mode 100644 index 000000000..7116a1828 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/store/StoreApiDelegateImpl.java @@ -0,0 +1,31 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app68.api.store; + +import org.springframework.stereotype.Service; + +@Service +public class StoreApiDelegateImpl implements StoreApiDelegate { + + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/UserApi.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/user/UserApi.java similarity index 87% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/UserApi.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/user/UserApi.java index 41fa1fc63..b13be29f4 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/UserApi.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/user/UserApi.java @@ -1,18 +1,22 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ @@ -21,7 +25,7 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -package test.org.springdoc.api.app2.api; +package test.org.springdoc.api.v30.app68.api.user; import java.util.List; @@ -35,7 +39,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; -import test.org.springdoc.api.app2.model.User; +import test.org.springdoc.api.v30.app68.model.User; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/user/UserApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/user/UserApiController.java new file mode 100644 index 000000000..24a271223 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/user/UserApiController.java @@ -0,0 +1,48 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app68.api.user; + +import java.util.Optional; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") + +@RestController +@RequestMapping("${openapi.openAPIPetstore.base-path:/}") +public class UserApiController implements UserApi { + + private final UserApiDelegate delegate; + + public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() { + }); + } + + @Override + public UserApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/UserApiDelegate.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/user/UserApiDelegate.java similarity index 76% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/UserApiDelegate.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/user/UserApiDelegate.java index 01a16709a..eb806ba0a 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/UserApiDelegate.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/user/UserApiDelegate.java @@ -1,27 +1,32 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app2.api; +package test.org.springdoc.api.v30.app68.api.user; import java.util.List; import java.util.Optional; -import test.org.springdoc.api.app2.model.User; +import test.org.springdoc.api.v30.app68.api.ApiUtil; +import test.org.springdoc.api.v30.app68.model.User; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/user/UserApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/user/UserApiDelegateImpl.java new file mode 100644 index 000000000..3aac4eda2 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/user/UserApiDelegateImpl.java @@ -0,0 +1,31 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app68.api.user; + +import org.springframework.stereotype.Service; + +@Service +public class UserApiDelegateImpl implements UserApiDelegate { + + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/user/UserClient.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/user/UserClient.java new file mode 100644 index 000000000..e58f49210 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/api/user/UserClient.java @@ -0,0 +1,41 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app68.api.user; + +import test.org.springdoc.api.v30.app68.model.User; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; + +@RequestMapping(value= "/users", consumes = "application/json") +@Controller +public class UserClient { + + @GetMapping("/{id}") + public User findById(@PathVariable Integer id) + { + return null; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/Body.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/Body.java similarity index 65% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/Body.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/Body.java index c2076e97f..273bac306 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/Body.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/Body.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app68.model; +package test.org.springdoc.api.v30.app68.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/Body1.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/Body1.java similarity index 68% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/Body1.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/Body1.java index 9fa7c2baf..d3201926b 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/Body1.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/Body1.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app68.model; +package test.org.springdoc.api.v30.app68.model; import java.io.File; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/Category.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/Category.java similarity index 61% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/Category.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/Category.java index 7605baf0b..15bae0da9 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/Category.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/Category.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app105.model; +package test.org.springdoc.api.v30.app68.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/ModelApiResponse.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/ModelApiResponse.java similarity index 69% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/ModelApiResponse.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/ModelApiResponse.java index 83616544c..2cc51c374 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/ModelApiResponse.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/ModelApiResponse.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app105.model; +package test.org.springdoc.api.v30.app68.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/Order.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/Order.java similarity index 82% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/Order.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/Order.java index feede5ec3..638aed9ef 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/Order.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/Order.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app68.model; +package test.org.springdoc.api.v30.app68.model; import java.util.Date; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/Pet.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/Pet.java similarity index 84% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/Pet.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/Pet.java index acffd6f16..3e43e4d2c 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/Pet.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/Pet.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app68.model; +package test.org.springdoc.api.v30.app68.model; import java.util.ArrayList; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/Tag.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/Tag.java similarity index 61% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/Tag.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/Tag.java index 5ee7098db..79e7b1995 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/Tag.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/Tag.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app105.model; +package test.org.springdoc.api.v30.app68.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/User.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/User.java similarity index 83% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/User.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/User.java index abbcb9bf0..dbb18c682 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/User.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app68/model/User.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app105.model; +package test.org.springdoc.api.v30.app68.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app69/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app69/HelloController.java new file mode 100644 index 000000000..d186ce67d --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app69/HelloController.java @@ -0,0 +1,40 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app69; + +import java.util.concurrent.Callable; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @RequestMapping(value = "/tasks", method = RequestMethod.GET) + private Callable> getTasks(String str) { + return null; + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app69/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app69/PersonDTO.java new file mode 100644 index 000000000..040963ce5 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app69/PersonDTO.java @@ -0,0 +1,64 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app69; + +public class PersonDTO { + private String email; + + private String firstName; + + private String lastName; + + public PersonDTO() { + } + + public PersonDTO(final String email, final String firstName, final String lastName) { + this.email = email; + this.firstName = firstName; + this.lastName = lastName; + } + + public String getEmail() { + return email; + } + + public void setEmail(final String email) { + this.email = email; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(final String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(final String lastName) { + this.lastName = lastName; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app69/SpringDocApp69Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app69/SpringDocApp69Test.java new file mode 100644 index 000000000..1236161a1 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app69/SpringDocApp69Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app69; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp69Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app7/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app7/HelloController.java new file mode 100644 index 000000000..4449d2840 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app7/HelloController.java @@ -0,0 +1,41 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app7; + +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.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @Operation(summary = "test Request") + @RequestBody(description = "test value", required = true, content = @Content(schema = @Schema(implementation = String.class))) + @PostMapping("/test") + public void searchEmployee(String test) { + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app7/SpringDocApp7Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app7/SpringDocApp7Test.java new file mode 100644 index 000000000..0de91445f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app7/SpringDocApp7Test.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app7; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp7Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/HelloController.java new file mode 100644 index 000000000..26f2b541e --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/HelloController.java @@ -0,0 +1,44 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app70; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import test.org.springdoc.api.v30.app70.customizer.CustomizedOperation; +import test.org.springdoc.api.v30.app70.customizer.CustomizedParameter; +import test.org.springdoc.api.v30.app70.model.ApiType; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @CustomizedOperation + @Operation(description = "Some operation") + @GetMapping("/example/{test}") + public ApiType test(@PathVariable @CustomizedParameter @Parameter(description = "Parameter description") String test) { + return new ApiType(); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/SpringDocApp70Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/SpringDocApp70Test.java new file mode 100644 index 000000000..562ccc0e1 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/SpringDocApp70Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app70; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp70Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedOperation.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedOperation.java new file mode 100644 index 000000000..846001d78 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedOperation.java @@ -0,0 +1,31 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app70.customizer; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Retention(RetentionPolicy.RUNTIME) +public @interface CustomizedOperation { + String addition() default "customized operation!"; +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedParameter.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedParameter.java new file mode 100644 index 000000000..a4d7a5eda --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedParameter.java @@ -0,0 +1,31 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app70.customizer; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Retention(RetentionPolicy.RUNTIME) +public @interface CustomizedParameter { + String addition() default "customized parameter!"; +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedProperty.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedProperty.java new file mode 100644 index 000000000..120154006 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/CustomizedProperty.java @@ -0,0 +1,31 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app70.customizer; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Retention(RetentionPolicy.RUNTIME) +public @interface CustomizedProperty { + String addition() default "customized property!"; +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/OperationCustomizer.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/OperationCustomizer.java new file mode 100644 index 000000000..3bc55c143 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/OperationCustomizer.java @@ -0,0 +1,40 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app70.customizer; + +import io.swagger.v3.oas.models.Operation; + +import org.springframework.stereotype.Component; +import org.springframework.web.method.HandlerMethod; + +@Component +public class OperationCustomizer implements org.springdoc.core.customizers.OperationCustomizer { + @Override + public Operation customize(Operation operation, HandlerMethod handlerMethod) { + CustomizedOperation annotation = handlerMethod.getMethodAnnotation(CustomizedOperation.class); + if (annotation != null) { + operation.description(operation.getDescription() + ", " + annotation.addition()); + } + return operation; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/ParameterCustomizer.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/ParameterCustomizer.java new file mode 100644 index 000000000..1c4bfc57f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/ParameterCustomizer.java @@ -0,0 +1,40 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app70.customizer; + +import io.swagger.v3.oas.models.parameters.Parameter; + +import org.springframework.core.MethodParameter; +import org.springframework.stereotype.Component; + +@Component +public class ParameterCustomizer implements org.springdoc.core.customizers.ParameterCustomizer { + @Override + public Parameter customize(Parameter parameterModel, MethodParameter methodParameter) { + CustomizedParameter annotation = methodParameter.getParameterAnnotation(CustomizedParameter.class); + if (annotation != null) { + parameterModel.description(parameterModel.getDescription() + ", " + annotation.addition()); + } + return parameterModel; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/PropertyCustomizer.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/PropertyCustomizer.java similarity index 50% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/PropertyCustomizer.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/PropertyCustomizer.java index 4502215e4..e68cf7575 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app70/customizer/PropertyCustomizer.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/customizer/PropertyCustomizer.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app70.customizer; +package test.org.springdoc.api.v30.app70.customizer; import java.lang.annotation.Annotation; import java.time.Duration; @@ -26,14 +30,19 @@ import com.fasterxml.jackson.databind.JavaType; import io.swagger.v3.core.converter.AnnotatedType; -import io.swagger.v3.core.util.Json; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.StringSchema; +import org.springdoc.core.providers.ObjectMapperProvider; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @Component public class PropertyCustomizer implements org.springdoc.core.customizers.PropertyCustomizer { + + @Autowired + ObjectMapperProvider objectMapperProvider; + @Override public Schema customize(Schema property, AnnotatedType type) { Annotation[] ctxAnnotations = type.getCtxAnnotations(); @@ -46,7 +55,7 @@ public Schema customize(Schema property, AnnotatedType type) { .findFirst() .map(CustomizedProperty.class::cast); - JavaType javaType = Json.mapper().constructType(type.getType()); + JavaType javaType = objectMapperProvider.jsonMapper().constructType(type.getType()); if (javaType.getRawClass().equals(Duration.class)) { property = new StringSchema().format("duration").properties(Collections.emptyMap()); } diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/model/ApiType.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/model/ApiType.java new file mode 100644 index 000000000..ccdef3c61 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app70/model/ApiType.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app70.model; + +import java.time.Duration; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import test.org.springdoc.api.v30.app70.customizer.CustomizedProperty; + +public class ApiType { + @CustomizedProperty + @Schema(description = "Test description") + @JsonProperty("someProperty") + private Duration someProperty; + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app71/Dog.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app71/Dog.java new file mode 100644 index 000000000..c217acd12 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app71/Dog.java @@ -0,0 +1,40 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app71; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + + +@Schema(name = "Dog") +public class Dog { + + @JsonProperty("display_name") + @Schema( + name = "display_name", + description = "A name given to the Dog", + example = "Fido" + ) + String displayName; + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app71/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app71/HelloController.java new file mode 100644 index 000000000..5b2e69f74 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app71/HelloController.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app71; + +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @PostMapping("/persons") + public String persons(Dog dog) { + return null; + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app71/SpringDocApp71Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app71/SpringDocApp71Test.java new file mode 100644 index 000000000..faa2b4d89 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app71/SpringDocApp71Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app71; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp71Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app72/BlockingAutoConfigurationTest.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app72/BlockingAutoConfigurationTest.java similarity index 76% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app72/BlockingAutoConfigurationTest.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app72/BlockingAutoConfigurationTest.java index 3a0dfbaf0..aa00439fe 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app72/BlockingAutoConfigurationTest.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app72/BlockingAutoConfigurationTest.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app72; +package test.org.springdoc.api.v30.app72; import org.junit.jupiter.api.Test; import org.springdoc.core.GroupedOpenApi; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app72/CacheAutoConfigurationTest1.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app72/CacheAutoConfigurationTest1.java similarity index 70% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app72/CacheAutoConfigurationTest1.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app72/CacheAutoConfigurationTest1.java index 3745fec4c..2eaf745da 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app72/CacheAutoConfigurationTest1.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app72/CacheAutoConfigurationTest1.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app72; +package test.org.springdoc.api.v30.app72; import org.junit.jupiter.api.Test; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app72/GroupAutoConfigurationTest.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app72/GroupAutoConfigurationTest.java similarity index 56% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app72/GroupAutoConfigurationTest.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app72/GroupAutoConfigurationTest.java index 83d923c10..e5c8b5be7 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app72/GroupAutoConfigurationTest.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app72/GroupAutoConfigurationTest.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app72; +package test.org.springdoc.api.v30.app72; import org.junit.jupiter.api.Test; import org.springdoc.core.GroupedOpenApi; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app73/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app73/HelloController.java similarity index 56% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app73/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app73/HelloController.java index 98911d905..34f6d73c2 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app73/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app73/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app73; +package test.org.springdoc.api.v30.app73; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.enums.ParameterIn; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app73/SpringDocApp73Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app73/SpringDocApp73Test.java new file mode 100644 index 000000000..df25f6386 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app73/SpringDocApp73Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app73; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp73Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app74/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app74/HelloController.java new file mode 100644 index 000000000..276fd2c7f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app74/HelloController.java @@ -0,0 +1,49 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app74; + +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import io.swagger.v3.oas.annotations.parameters.RequestBody; + +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; + + +@RestController +public class HelloController { + + @PostMapping("/test") + @RequestBody( + content = @Content( + examples = @ExampleObject( + value = "sample" + ) + ) + ) + public String postMyRequestBody( + String myRequestBody) { + return null; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app74/SpringDocApp74Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app74/SpringDocApp74Test.java new file mode 100644 index 000000000..f6463d77b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app74/SpringDocApp74Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app74; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp74Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app75/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app75/HelloController.java similarity index 76% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app75/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app75/HelloController.java index f0f738d47..c611ff67a 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app75/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app75/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app75; +package test.org.springdoc.api.v30.app75; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app75/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app75/PersonDTO.java new file mode 100644 index 000000000..31774859f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app75/PersonDTO.java @@ -0,0 +1,64 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app75; + +public class PersonDTO { + private String email; + + private String firstName; + + private String lastName; + + public PersonDTO() { + } + + public PersonDTO(final String email, final String firstName, final String lastName) { + this.email = email; + this.firstName = firstName; + this.lastName = lastName; + } + + public String getEmail() { + return email; + } + + public void setEmail(final String email) { + this.email = email; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(final String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(final String lastName) { + this.lastName = lastName; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app75/RestResponseEntityExceptionHandler.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app75/RestResponseEntityExceptionHandler.java new file mode 100644 index 000000000..49bcab26f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app75/RestResponseEntityExceptionHandler.java @@ -0,0 +1,44 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app75; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler; + +@ControllerAdvice +public class RestResponseEntityExceptionHandler + extends ResponseEntityExceptionHandler { + @ResponseStatus(value = HttpStatus.OK) + @ExceptionHandler({ Exception.class }) + public ResponseEntity> badRequest(HttpServletRequest req, Exception exception) { + return null; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app75/SpringDocApp75Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app75/SpringDocApp75Test.java new file mode 100644 index 000000000..66d80db3f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app75/SpringDocApp75Test.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app75; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp75Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp { + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app76/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app76/HelloController.java new file mode 100644 index 000000000..9686e05fb --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app76/HelloController.java @@ -0,0 +1,48 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app76; + +import io.swagger.v3.oas.annotations.security.SecurityRequirements; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; + + +@RestController +public class HelloController { + + @GetMapping("/secure") + @ResponseBody + public String secured() { + return "It works!"; + } + + @GetMapping("/open") + @ResponseBody + @SecurityRequirements + public String open() { + return "It works!"; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app76/SpringDocApp76Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app76/SpringDocApp76Test.java new file mode 100644 index 000000000..c8c14c706 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app76/SpringDocApp76Test.java @@ -0,0 +1,53 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app76; + +import java.util.Arrays; + +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.security.SecurityRequirement; +import io.swagger.v3.oas.models.security.SecurityScheme; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; + +public class SpringDocApp76Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp { + @Bean + public OpenAPI openAPI() { + return new OpenAPI() + .components(new Components().addSecuritySchemes("bearer-jwt", + new SecurityScheme() + .type(SecurityScheme.Type.HTTP) + .scheme("bearer") + .bearerFormat("JWT")) + ) + .addSecurityItem( + new SecurityRequirement().addList("bearer-jwt", Arrays.asList("read", "write"))); + } + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app77/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app77/HelloController.java similarity index 59% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app77/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app77/HelloController.java index c7a896470..b25468475 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app77/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app77/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app77; +package test.org.springdoc.api.v30.app77; import javax.validation.Valid; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app77/SpringDocApp77Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app77/SpringDocApp77Test.java new file mode 100644 index 000000000..d15a1afe9 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app77/SpringDocApp77Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app77; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp77Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app78/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app78/HelloController.java new file mode 100644 index 000000000..8e9cf4307 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app78/HelloController.java @@ -0,0 +1,46 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app78; + +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionStage; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @RequestMapping(value = "/person1", method = RequestMethod.GET) + private CompletionStage> getPerson1(String str) { + return null; + } + + @RequestMapping(value = "/person2", method = RequestMethod.GET) + private CompletableFuture getPerson2(String str) { + return null; + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app78/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app78/PersonDTO.java new file mode 100644 index 000000000..223540660 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app78/PersonDTO.java @@ -0,0 +1,64 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app78; + +public class PersonDTO { + private String email; + + private String firstName; + + private String lastName; + + public PersonDTO() { + } + + public PersonDTO(final String email, final String firstName, final String lastName) { + this.email = email; + this.firstName = firstName; + this.lastName = lastName; + } + + public String getEmail() { + return email; + } + + public void setEmail(final String email) { + this.email = email; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(final String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(final String lastName) { + this.lastName = lastName; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app78/SpringDocApp78Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app78/SpringDocApp78Test.java new file mode 100644 index 000000000..20712a7b1 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app78/SpringDocApp78Test.java @@ -0,0 +1,33 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app78; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp78Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app79/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app79/HelloController.java new file mode 100644 index 000000000..f43b1bfc7 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app79/HelloController.java @@ -0,0 +1,40 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app79; + +import java.util.Optional; + +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping(produces = MediaType.TEXT_PLAIN_VALUE, path = "/test") + public String echo(@RequestParam Optional text) { + return text.orElse("not-specified"); + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app79/SpringDocApp79Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app79/SpringDocApp79Test.java new file mode 100644 index 000000000..4a9834fe5 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app79/SpringDocApp79Test.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app79; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + + +public class SpringDocApp79Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app8/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app8/HelloController.java new file mode 100644 index 000000000..dcaf48cb9 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app8/HelloController.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app8; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping("/test") + public void test(String hello) { + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app8/SpringDocApp8Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app8/SpringDocApp8Test.java new file mode 100644 index 000000000..2973929d6 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app8/SpringDocApp8Test.java @@ -0,0 +1,45 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app8; + +import org.junit.jupiter.api.Test; +import org.springdoc.core.Constants; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + + +public class SpringDocApp8Test extends AbstractSpringDocV30Test { + + @Test + public void testApp() throws Exception { + mockMvc.perform(get("/myapp" + Constants.DEFAULT_API_DOCS_URL).contextPath("/myapp")) + .andExpect(status().isOk()); + } + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app80/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app80/HelloController.java similarity index 60% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app80/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app80/HelloController.java index ea9a745ba..bbb03cc0b 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app80/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app80/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app80; +package test.org.springdoc.api.v30.app80; import java.net.URISyntaxException; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app80/SpringDocApp80Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app80/SpringDocApp80Test.java new file mode 100644 index 000000000..61376d186 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app80/SpringDocApp80Test.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app80; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.ActiveProfiles; + +@ActiveProfiles("80") +public class SpringDocApp80Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app80/TestObject.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app80/TestObject.java new file mode 100644 index 000000000..8f90ad98f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app80/TestObject.java @@ -0,0 +1,47 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app80; + +import java.time.LocalDateTime; + +public class TestObject { + public String stringValue; + + public LocalDateTime localDateTime; + + public String getStringValue() { + return stringValue; + } + + public void setStringValue(String stringValue) { + this.stringValue = stringValue; + } + + public LocalDateTime getLocalDateTime() { + return localDateTime; + } + + public void setLocalDateTime(LocalDateTime localDateTime) { + this.localDateTime = localDateTime; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app81/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app81/HelloController.java new file mode 100644 index 000000000..700730dc7 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app81/HelloController.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app81; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/api") +public class HelloController { + + @RequestMapping + public String test() { + return "ok"; + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app81/SpringDocApp81Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app81/SpringDocApp81Test.java similarity index 74% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app81/SpringDocApp81Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app81/SpringDocApp81Test.java index 1c2f50f57..1a0330799 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app81/SpringDocApp81Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app81/SpringDocApp81Test.java @@ -1,26 +1,30 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app81; +package test.org.springdoc.api.v30.app81; import org.junit.jupiter.api.Test; import org.springdoc.core.Constants; -import test.org.springdoc.api.AbstractSpringDocTest; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -31,7 +35,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -public class SpringDocApp81Test extends AbstractSpringDocTest { +public class SpringDocApp81Test extends AbstractSpringDocV30Test { @Test public void testApp() throws Exception { diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app82/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app82/HelloController.java new file mode 100644 index 000000000..edbf3eb68 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app82/HelloController.java @@ -0,0 +1,40 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app82; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + + @PutMapping(value = "/test") + public ResponseEntity put( + String configuration, + String second, PersonDTO personDTO) { + return null; + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app82/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app82/PersonDTO.java new file mode 100644 index 000000000..d3d14784f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app82/PersonDTO.java @@ -0,0 +1,64 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app82; + +public class PersonDTO { + private String email; + + private String firstName; + + private String lastName; + + public PersonDTO() { + } + + public PersonDTO(final String email, final String firstName, final String lastName) { + this.email = email; + this.firstName = firstName; + this.lastName = lastName; + } + + public String getEmail() { + return email; + } + + public void setEmail(final String email) { + this.email = email; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(final String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(final String lastName) { + this.lastName = lastName; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app82/SpringDocApp82Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app82/SpringDocApp82Test.java new file mode 100644 index 000000000..e1695367d --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app82/SpringDocApp82Test.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app82; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp82Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app83/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app83/HelloController.java similarity index 59% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app83/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app83/HelloController.java index bd4123872..a7e0d7f47 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app83/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app83/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app83; +package test.org.springdoc.api.v30.app83; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app83/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app83/PersonDTO.java new file mode 100644 index 000000000..712525b2d --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app83/PersonDTO.java @@ -0,0 +1,64 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app83; + +public class PersonDTO { + private String email; + + private String firstName; + + private String lastName; + + public PersonDTO() { + } + + public PersonDTO(final String email, final String firstName, final String lastName) { + this.email = email; + this.firstName = firstName; + this.lastName = lastName; + } + + public String getEmail() { + return email; + } + + public void setEmail(final String email) { + this.email = email; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(final String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(final String lastName) { + this.lastName = lastName; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app83/SpringDocApp83Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app83/SpringDocApp83Test.java new file mode 100644 index 000000000..9449b8036 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app83/SpringDocApp83Test.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app83; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp83Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app84/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app84/HelloController.java new file mode 100644 index 000000000..e471ba38c --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app84/HelloController.java @@ -0,0 +1,43 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app84; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/api") +public class HelloController { + + @GetMapping("/persons") + public String persons() { + return "OK"; + } + + @GetMapping("/persons1") + public String persons(String toto) { + return "OK"; + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app84/SpringDocApp84Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app84/SpringDocApp84Test.java new file mode 100644 index 000000000..3e7660394 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app84/SpringDocApp84Test.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app84; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp84Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app85/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app85/HelloController.java new file mode 100644 index 000000000..73d9e24ff --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app85/HelloController.java @@ -0,0 +1,46 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app85; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; + +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/api") +public class HelloController { + + @PostMapping("/test/{id}") + @Operation( + parameters = { + @Parameter(ref = "#/components/parameters/paramA"), + @Parameter(ref = "#/components/parameters/paramB") + } + ) + public void testme(@PathVariable("id") String id) { + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app85/SpringDocApp85Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app85/SpringDocApp85Test.java new file mode 100644 index 000000000..7753fce97 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app85/SpringDocApp85Test.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app85; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp85Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app86/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app86/HelloController.java new file mode 100644 index 000000000..e9198c6e4 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app86/HelloController.java @@ -0,0 +1,42 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app86; + +import java.util.Locale; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping("/test") + public void test(HttpSession header, HttpServletRequest request, HttpServletResponse response, Locale locale, + String hello) { + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app86/SpringDocApp86Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app86/SpringDocApp86Test.java new file mode 100644 index 000000000..997b6830c --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app86/SpringDocApp86Test.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app86; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; + +@TestPropertySource(properties = { + "springdoc.packagesToScan=test.org.springdoc.api.v30.app86", + "springdoc.packagesToExclude=test.org.springdoc.api.v30.app86.test" }) +public class SpringDocApp86Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app86/test/HelloController2.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app86/test/HelloController2.java new file mode 100644 index 000000000..f16958637 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app86/test/HelloController2.java @@ -0,0 +1,42 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app86.test; + +import java.util.Locale; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController2 { + + @GetMapping("/test2") + public void test(HttpSession header, HttpServletRequest request, HttpServletResponse response, Locale locale, + String hello) { + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app87/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app87/HelloController.java new file mode 100644 index 000000000..b423ffa4e --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app87/HelloController.java @@ -0,0 +1,54 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app87; + +import java.util.UUID; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.parameters.RequestBody; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.CookieValue; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RestController; + + +@RestController("cookie") +public class HelloController { + + @PutMapping("/{itemId}") + @Operation + public ResponseEntity putItem( + @CookieValue( + name = "cookie" + ) String cookie, + @PathVariable UUID itemId, + @RequestBody Item item + ) { + return ResponseEntity.ok(item); + } + + public static class Item { + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app87/SpringDocApp87Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app87/SpringDocApp87Test.java new file mode 100644 index 000000000..02b4e5f57 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app87/SpringDocApp87Test.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app87; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp87Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app88/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app88/HelloController.java new file mode 100644 index 000000000..e7b649dad --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app88/HelloController.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app88; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping(value = "/persons") + public String persons() { + return null; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app88/SpringDocApp88Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app88/SpringDocApp88Test.java new file mode 100644 index 000000000..7d30b06ff --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app88/SpringDocApp88Test.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app88; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; + +@TestPropertySource(properties = "springdoc.auto-tag-classes=false") +public class SpringDocApp88Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app89/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app89/HelloController.java new file mode 100644 index 000000000..3054dfe9d --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app89/HelloController.java @@ -0,0 +1,41 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app89; + +import io.swagger.v3.oas.annotations.Operation; + +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.servlet.ModelAndView; + +@RestController +public class HelloController { + + @Operation(summary = "Get Status") + @GetMapping(value = "/status", produces = MediaType.TEXT_HTML_VALUE) + public ModelAndView getAddress(@PathVariable String id) { + return null; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app89/SpringDocApp89Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app89/SpringDocApp89Test.java new file mode 100644 index 000000000..2c13cb843 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app89/SpringDocApp89Test.java @@ -0,0 +1,44 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app89; + + +import io.swagger.v3.oas.models.media.ObjectSchema; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; +import org.springframework.web.servlet.ModelAndView; + +import static org.springdoc.core.SpringDocUtils.getConfig; + +@TestPropertySource(properties = "springdoc.model-and-view-allowed=true") +public class SpringDocApp89Test extends AbstractSpringDocV30Test { + + static { + getConfig().replaceWithSchema(ModelAndView.class, new ObjectSchema()); + } + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app9/MyApi.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app9/MyApi.java new file mode 100644 index 000000000..900a72e62 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app9/MyApi.java @@ -0,0 +1,41 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app9; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.enums.ParameterIn; + +import org.springframework.http.HttpHeaders; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; + +@RequestMapping("/myapi") +public interface MyApi { + + @Operation(description = "Annotations from interfaces test") + @GetMapping + String get( + @Parameter(hidden = true, in = ParameterIn.HEADER, name = HttpHeaders.ACCEPT_LANGUAGE) @RequestHeader(value = HttpHeaders.ACCEPT_LANGUAGE, required = false) String language); +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app9/MyApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app9/MyApiController.java new file mode 100644 index 000000000..d516227f8 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app9/MyApiController.java @@ -0,0 +1,43 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app9; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class MyApiController implements MyApi { + public String get(String language) { + return language; + } + + + @Operation(description = "Annotations from class with hidden parameter code") + @GetMapping("/getCode") + public String getCode(@Parameter(hidden = true) String code) { + return code; + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app9/SpringDocApp9Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app9/SpringDocApp9Test.java new file mode 100644 index 000000000..5b0d9bd95 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app9/SpringDocApp9Test.java @@ -0,0 +1,34 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app9; + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp9Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app90/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app90/HelloController.java similarity index 68% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app90/HelloController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app90/HelloController.java index 7d86e4f5c..91b431294 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app90/HelloController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app90/HelloController.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app90; +package test.org.springdoc.api.v30.app90; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.ExampleObject; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app90/SpringDocApp90Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app90/SpringDocApp90Test.java new file mode 100644 index 000000000..a7163daeb --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app90/SpringDocApp90Test.java @@ -0,0 +1,30 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app90; + + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +public class SpringDocApp90Test extends AbstractSpringDocV30Test { + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app90/SpringDocTestApp.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app90/SpringDocTestApp.java similarity index 69% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app90/SpringDocTestApp.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app90/SpringDocTestApp.java index 3e03ab9b2..85711c0f9 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app90/SpringDocTestApp.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app90/SpringDocTestApp.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app90; +package test.org.springdoc.api.v30.app90; import java.io.IOException; import java.io.InputStreamReader; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app90/User.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app90/User.java similarity index 86% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app90/User.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app90/User.java index 1f60a92cc..eaf088223 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app90/User.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app90/User.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app90; +package test.org.springdoc.api.v30.app90; import java.util.Objects; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app91/Advice.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app91/Advice.java similarity index 74% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app91/Advice.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app91/Advice.java index 050eb59f4..206c1c731 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app91/Advice.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app91/Advice.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app91; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app91; import javax.servlet.http.HttpServletRequest; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app91/ApiError.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app91/ApiError.java similarity index 53% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app91/ApiError.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app91/ApiError.java index 392e28df2..fd2cc95bf 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app91/ApiError.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app91/ApiError.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app91; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app91; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app91/Greeting.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app91/Greeting.java new file mode 100644 index 000000000..3167d511b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app91/Greeting.java @@ -0,0 +1,48 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app91; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +@Schema( + type = "object", + name = "Greeting", + title = "Greeting", + description = "An object containing a greeting message") +public class Greeting { + + + @Schema( + name = "payload", + description = "The greeting value", + type = "string", + nullable = false, + example = "sdfsdfs") + @JsonProperty("payload") + private String payload; + + public Greeting(String payload) { + this.payload = payload; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app91/GreetingController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app91/GreetingController.java similarity index 61% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app91/GreetingController.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app91/GreetingController.java index 5e39e430c..e1532341f 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app91/GreetingController.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app91/GreetingController.java @@ -1,4 +1,26 @@ -package test.org.springdoc.api.app91; +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app91; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.responses.ApiResponse; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app91/SpringDocApp91Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app91/SpringDocApp91Test.java new file mode 100644 index 000000000..d21b79c67 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app91/SpringDocApp91Test.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app91; + + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; + +@TestPropertySource(properties = "springdoc.override-with-generic-response=false") +public class SpringDocApp91Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app92/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app92/HelloController.java new file mode 100644 index 000000000..0343d0c35 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app92/HelloController.java @@ -0,0 +1,40 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app92; + +import javax.validation.constraints.NotNull; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/test") +public class HelloController { + + @GetMapping + String index(@NotNull String test) { + return null; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app92/ParameterCustomizer.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app92/ParameterCustomizer.java new file mode 100644 index 000000000..115abf1b0 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app92/ParameterCustomizer.java @@ -0,0 +1,42 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app92; + +import javax.validation.constraints.NotNull; + +import io.swagger.v3.oas.models.parameters.Parameter; + +import org.springframework.core.MethodParameter; +import org.springframework.stereotype.Component; + +@Component +public class ParameterCustomizer implements org.springdoc.core.customizers.ParameterCustomizer { + @Override + public Parameter customize(Parameter parameterModel, MethodParameter methodParameter) { + NotNull annotation = methodParameter.getParameterAnnotation(NotNull.class); + if (annotation != null) { + parameterModel.required(false); + } + return parameterModel; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app92/SpringDocApp92Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app92/SpringDocApp92Test.java new file mode 100644 index 000000000..1d4d0cd9d --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app92/SpringDocApp92Test.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app92; + + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp92Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app93/BaseClientModel.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app93/BaseClientModel.java new file mode 100644 index 000000000..d55bcf73f --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app93/BaseClientModel.java @@ -0,0 +1,30 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app93; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public abstract class BaseClientModel { + @JsonProperty("id") + int id; +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app93/BaseController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app93/BaseController.java new file mode 100644 index 000000000..6432ef4ee --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app93/BaseController.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app93; + +import io.swagger.v3.oas.annotations.Operation; + +import org.springframework.web.bind.annotation.GetMapping; + +public abstract class BaseController { + @Operation + @GetMapping + TClientModel get(TClientModel param) { + return null; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app93/SpecificClientModel.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app93/SpecificClientModel.java new file mode 100644 index 000000000..adf3db566 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app93/SpecificClientModel.java @@ -0,0 +1,30 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app93; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class SpecificClientModel extends BaseClientModel { + @JsonProperty("name") + String name; +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app93/SpecificController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app93/SpecificController.java new file mode 100644 index 000000000..d43abea73 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app93/SpecificController.java @@ -0,0 +1,28 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app93; + +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class SpecificController extends BaseController {} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app93/SpringDocApp93Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app93/SpringDocApp93Test.java new file mode 100644 index 000000000..5b51a588e --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app93/SpringDocApp93Test.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app93; + + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp93Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app94/SpringDocApp94Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app94/SpringDocApp94Test.java similarity index 83% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app94/SpringDocApp94Test.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app94/SpringDocApp94Test.java index e4f43875f..35944807e 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app94/SpringDocApp94Test.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app94/SpringDocApp94Test.java @@ -1,23 +1,27 @@ -package test.org.springdoc.api.app94; - /* * - * * Copyright 2019-2020 the original author or authors. - * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at * * - * * https://www.apache.org/licenses/LICENSE-2.0 + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ +package test.org.springdoc.api.v30.app94; + import java.util.Collections; import java.util.List; import java.util.Optional; @@ -38,8 +42,8 @@ import org.springdoc.core.customizers.OperationCustomizer; import org.springdoc.core.filters.OpenApiMethodFilter; import org.springdoc.webmvc.api.OpenApiWebMvcResource; -import test.org.springdoc.api.AbstractSpringDocTest; -import test.org.springdoc.api.app91.Greeting; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; +import test.org.springdoc.api.v30.app91.Greeting; import org.springframework.beans.BeansException; import org.springframework.beans.factory.ObjectFactory; @@ -60,7 +64,7 @@ import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; @TestPropertySource(properties = "springdoc.default-produces-media-type=application/json") -public class SpringDocApp94Test extends AbstractSpringDocTest { +public class SpringDocApp94Test extends AbstractSpringDocV30Test { @SpringBootApplication static class SpringDocTestApp implements ApplicationContextAware { diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app95/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app95/HelloController.java new file mode 100644 index 000000000..9b42bfc53 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app95/HelloController.java @@ -0,0 +1,43 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app95; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/persons") +public class HelloController { + + @GetMapping + @Operation(summary = "${test.app95.operation.persons.summary}", + description = "${test.app95.operation.persons.description}") + public void persons(@Parameter(description = "${test.app95.param.name.description}") String name) { + + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app95/SpringDocApp95Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app95/SpringDocApp95Test.java new file mode 100644 index 000000000..14e7c5c52 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app95/SpringDocApp95Test.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app95; + + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.ActiveProfiles; + +@ActiveProfiles("95") +public class SpringDocApp95Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app96/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app96/HelloController.java new file mode 100644 index 000000000..9f7d3f809 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app96/HelloController.java @@ -0,0 +1,51 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app96; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; + +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + + @PostMapping("/api1") + String test1(@RequestBody @Min(2) int test) { + return null; + } + + @PostMapping("/api2") + String test2(@RequestBody String test) { + return null; + } + + @PostMapping("/api3") + String test3(@NotNull String test) { + return null; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app96/SpringDocApp96Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app96/SpringDocApp96Test.java new file mode 100644 index 000000000..178d595d6 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app96/SpringDocApp96Test.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app96; + + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp96Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app97/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app97/HelloController.java new file mode 100644 index 000000000..7144dc417 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app97/HelloController.java @@ -0,0 +1,47 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app97; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/api") +public class HelloController { + + @GetMapping(value = "/student/header1", headers = "X-API-VERSION=1") + public StudentV1 headerV1() { + return new StudentV1("Bob Charlie"); + } + + @GetMapping(value = "/student/header2", headers = "X-API-VERSION=2") + public StudentV2 headerV2() { + return new StudentV2("Charlie"); + } + + @GetMapping(value = "/student/header3", headers = "X-API-VERSION") + public StudentV3 headerV3() { + return new StudentV3("Tom Charlie"); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app97/SpringDocApp97Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app97/SpringDocApp97Test.java new file mode 100644 index 000000000..9885d917c --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app97/SpringDocApp97Test.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app97; + + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp97Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app97/StudentV1.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app97/StudentV1.java new file mode 100644 index 000000000..e09b36b1e --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app97/StudentV1.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app97; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class StudentV1 { + + @JsonProperty("name") + private String name; + + public StudentV1(String name) { + this.name = name; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app97/StudentV2.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app97/StudentV2.java new file mode 100644 index 000000000..13037b26d --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app97/StudentV2.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app97; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class StudentV2 { + + @JsonProperty("name") + private String name; + + public StudentV2(String name) { + this.name = name; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app97/StudentV3.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app97/StudentV3.java new file mode 100644 index 000000000..f7b71c242 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app97/StudentV3.java @@ -0,0 +1,35 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app97; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class StudentV3 { + + @JsonProperty("name") + private String name; + + public StudentV3(String name) { + this.name = name; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app98/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app98/HelloController.java new file mode 100644 index 000000000..c9111f7f7 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app98/HelloController.java @@ -0,0 +1,36 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app98; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping("/persons") + public void persons(@IgnoredAnnotationParameter String name) { + + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app98/IgnoredAnnotationParameter.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app98/IgnoredAnnotationParameter.java new file mode 100644 index 000000000..e73b8ad67 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app98/IgnoredAnnotationParameter.java @@ -0,0 +1,31 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app98; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Retention(RetentionPolicy.RUNTIME) +public @interface IgnoredAnnotationParameter { + String addition() default "customized parameter!"; +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app98/SpringDocApp98Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app98/SpringDocApp98Test.java new file mode 100644 index 000000000..6c7757de0 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app98/SpringDocApp98Test.java @@ -0,0 +1,39 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app98; + + +import org.springdoc.core.SpringDocUtils; +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +public class SpringDocApp98Test extends AbstractSpringDocV30Test { + + static { + SpringDocUtils.getConfig().addAnnotationsToIgnore(IgnoredAnnotationParameter.class); + } + + @SpringBootApplication + static class SpringDocTestApp {} +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app99/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app99/HelloController.java new file mode 100644 index 000000000..261cb8ff8 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app99/HelloController.java @@ -0,0 +1,44 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app99; + +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/persons") +public class HelloController { + + @GetMapping + @ApiResponses({ + @ApiResponse(responseCode = "202", description = "${test.app99.operation.persons.response.202.description}") + }) + public void persons() { + + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app99/SpringDocApp99Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app99/SpringDocApp99Test.java new file mode 100644 index 000000000..47ac5bc81 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v30/app99/SpringDocApp99Test.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v30.app99; + + +import test.org.springdoc.api.v30.AbstractSpringDocV30Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.ActiveProfiles; + +@ActiveProfiles("99") +public class SpringDocApp99Test extends AbstractSpringDocV30Test { + + @SpringBootApplication + static class SpringDocTestApp {} + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/AbstractSpringDocActuatorV31Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/AbstractSpringDocActuatorV31Test.java new file mode 100644 index 000000000..d7a115d70 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/AbstractSpringDocActuatorV31Test.java @@ -0,0 +1,51 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31; + +import javax.annotation.PostConstruct; + +import test.org.springdoc.api.AbstractCommonTest; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.actuate.autoconfigure.web.server.LocalManagementPort; +import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.test.context.TestPropertySource; +import org.springframework.web.client.RestTemplate; + +@TestPropertySource(properties={ "management.endpoints.enabled-by-default=true", "springdoc.api-docs.version=openapi_3_1" }) +public abstract class AbstractSpringDocActuatorV31Test extends AbstractCommonTest { + + @LocalManagementPort + private int managementPort; + + @Autowired + private RestTemplateBuilder restTemplateBuilder; + + protected RestTemplate actuatorRestTemplate; + + @PostConstruct + void init() { + actuatorRestTemplate = restTemplateBuilder + .rootUri("http://localhost:" + this.managementPort).build(); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/AbstractSpringDocV31Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/AbstractSpringDocV31Test.java new file mode 100644 index 000000000..e8c6292b3 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/AbstractSpringDocV31Test.java @@ -0,0 +1,55 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31; + +import org.junit.jupiter.api.Test; +import org.springdoc.core.Constants; +import test.org.springdoc.api.AbstractCommonTest; + +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.TestPropertySource; +import org.springframework.test.web.servlet.MvcResult; + +import static org.hamcrest.Matchers.is; +import static org.skyscreamer.jsonassert.JSONAssert.assertEquals; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + +@SpringBootTest +@TestPropertySource(properties = {"springdoc.api-docs.version=openapi_3_1"}) +public abstract class AbstractSpringDocV31Test extends AbstractCommonTest { + + public static String className; + + @Test + public void testApp() throws Exception { + className = getClass().getSimpleName(); + String testNumber = className.replaceAll("[^0-9]", ""); + MvcResult mockMvcResult = mockMvc.perform(get(Constants.DEFAULT_API_DOCS_URL)).andExpect(status().isOk()) + .andExpect(jsonPath("$.openapi", is("3.1.0"))).andReturn(); + String result = mockMvcResult.getResponse().getContentAsString(); + String expected = getContent("results/3.1.0/app" + testNumber + ".json"); + assertEquals(expected, result, true); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ApiException.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ApiException.java new file mode 100644 index 000000000..f9e28f902 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ApiException.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app1; + +public final class ApiException extends Exception { + + private static final long serialVersionUID = 1L; + + @SuppressWarnings("unused") + + private final int code; + + public ApiException(int code, String msg) { + super(msg); + this.code = code; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ApiOriginFilter.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ApiOriginFilter.java new file mode 100644 index 000000000..c9abd5ddb --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ApiOriginFilter.java @@ -0,0 +1,53 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app1; + +import java.io.IOException; + +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletResponse; + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2019-07-08T09:37:36.546Z[GMT]") +public class ApiOriginFilter implements javax.servlet.Filter { + @Override + public void doFilter(ServletRequest request, ServletResponse response, + FilterChain chain) throws IOException, ServletException { + HttpServletResponse res = (HttpServletResponse) response; + res.addHeader("Access-Control-Allow-Origin", "*"); + res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); + res.addHeader("Access-Control-Allow-Headers", "Content-Type"); + chain.doFilter(request, response); + } + + @Override + public void destroy() { + } + + @Override + public void init(FilterConfig filterConfig) throws ServletException { + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ApiResponseMessage.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ApiResponseMessage.java new file mode 100644 index 000000000..b7100e4c2 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ApiResponseMessage.java @@ -0,0 +1,98 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app1; + +import javax.xml.bind.annotation.XmlTransient; + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2019-07-08T09:37:36.546Z[GMT]") +@javax.xml.bind.annotation.XmlRootElement +public class ApiResponseMessage { + public static final int ERROR = 1; + + public static final int WARNING = 2; + + public static final int INFO = 3; + + public static final int OK = 4; + + public static final int TOO_BUSY = 5; + + int code; + + String type; + + String message; + + public ApiResponseMessage() { + } + + public ApiResponseMessage(int code, String message) { + this.code = code; + switch (code) { + case ERROR: + setType("error"); + break; + case WARNING: + setType("warning"); + break; + case INFO: + setType("info"); + break; + case OK: + setType("ok"); + break; + case TOO_BUSY: + setType("too busy"); + break; + default: + setType("unknown"); + break; + } + this.message = message; + } + + @XmlTransient + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ErrorMessage.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ErrorMessage.java new file mode 100644 index 000000000..ed18a18dd --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ErrorMessage.java @@ -0,0 +1,52 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app1; + +public class ErrorMessage { + + private String id; + + private String message; + + public ErrorMessage(String id, String message2) { + this.id = id; + this.message = message2; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ExceptionTranslator.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ExceptionTranslator.java new file mode 100644 index 000000000..6bce1233c --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ExceptionTranslator.java @@ -0,0 +1,52 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app1; + +import java.util.UUID; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.ResponseStatus; + +@ControllerAdvice +public class ExceptionTranslator { + + private static final Logger LOGGER = LoggerFactory.getLogger(ExceptionTranslator.class); + + @ExceptionHandler({ RuntimeException.class }) + @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) + public ResponseEntity handleRunTimeException(RuntimeException e) { + return error(HttpStatus.INTERNAL_SERVER_ERROR, e); + } + + + private ResponseEntity error(HttpStatus status, Exception e) { + LOGGER.error("Exception : ", e); + return ResponseEntity.status(status).body(new ErrorMessage(UUID.randomUUID().toString(), e.getMessage())); + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/HelloController.java new file mode 100644 index 000000000..f02cd9e90 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/HelloController.java @@ -0,0 +1,44 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app1; + + +import io.swagger.v3.oas.annotations.tags.Tag; + +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @GetMapping(value = "/hello/{numTelco}") + @ResponseStatus(HttpStatus.I_AM_A_TEAPOT) + @Tag(name = "${prop.toto}") + public String index(@PathVariable("numTelco") String numTel, String adresse) { + return "Greetings from Spring Boot!"; + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/HomeController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/HomeController.java new file mode 100644 index 000000000..795aa261a --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/HomeController.java @@ -0,0 +1,46 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app1; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; + +import static org.springdoc.core.Constants.SWAGGER_UI_PATH; +import static org.springframework.util.AntPathMatcher.DEFAULT_PATH_SEPARATOR; +import static org.springframework.web.servlet.view.UrlBasedViewResolver.REDIRECT_URL_PREFIX; + +/** + * Home redirection to swagger api documentation + */ +@Controller +public class HomeController { + + @Value(SWAGGER_UI_PATH) + private String swaggerUiPath; + + @GetMapping(DEFAULT_PATH_SEPARATOR) + public String index() { + return REDIRECT_URL_PREFIX + swaggerUiPath; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/InventoryApi.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/InventoryApi.java new file mode 100644 index 000000000..62eece6e9 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/InventoryApi.java @@ -0,0 +1,72 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +/** + * NOTE: This class is auto generated by the swagger code generator program (3.0.8). + * https://github.com/swagger-api/swagger-codegen + * Do not edit the class manually. + */ +package test.org.springdoc.api.v31.app1; + +import java.util.List; + +import javax.validation.Valid; +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.tags.Tag; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2019-07-08T09:37:36.546Z[GMT]") +@Tag(name = "inventory") +public interface InventoryApi { + + @Operation(description = "adds an inventory item", operationId = "addInventory", summary = "Adds an item to the system", tags = { + "admins", }) + @ApiResponses(value = { @ApiResponse(responseCode = "201", description = "item created"), + @ApiResponse(responseCode = "400", description = "invalid input, object invalid"), + @ApiResponse(responseCode = "409", description = "an existing item already exists") }) + @PostMapping(value = "/inventory", consumes = { "application/json" }) + ResponseEntity addInventory( + @io.swagger.v3.oas.annotations.parameters.RequestBody(description = "Inventory item to do") @Valid @RequestBody InventoryItem body); + + @Operation(description = "searches inventory", operationId = "searchInventory", summary = "By passing in the appropriate options, you can search for available inventory in the system ", tags = { + "developers", }, parameters = { + @Parameter(description = "pass an optional search string for looking up inventory", name = "searchString") }) + @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "search results matching criteria"), + @ApiResponse(responseCode = "400", description = "bad input parameter") }) + @GetMapping(value = "/inventory", produces = { "application/json" }) + ResponseEntity> searchInventory( + @Valid @RequestParam(value = "searchString", required = false) String searchString, + @Min(0) @Parameter(description = "number of records to skip for pagination") @Valid @RequestParam(value = "skip", required = true) Integer skip, + @Min(0) @Max(50) @Parameter(description = "maximum number of records to return") @Valid @RequestParam(value = "limit", required = true) Integer limit); + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/InventoryApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/InventoryApiController.java new file mode 100644 index 000000000..b4f54f53b --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/InventoryApiController.java @@ -0,0 +1,77 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app1; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.validation.Valid; +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; + +import com.fasterxml.jackson.databind.ObjectMapper; +import io.swagger.v3.oas.annotations.Parameter; + +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2019-07-08T09:37:36.546Z[GMT]") +@RestController +public class InventoryApiController implements InventoryApi { + + + @SuppressWarnings("unused") + private final ObjectMapper objectMapper; + + private final HttpServletRequest request; + + @org.springframework.beans.factory.annotation.Autowired + public InventoryApiController(ObjectMapper objectMapper, HttpServletRequest request) { + this.objectMapper = objectMapper; + this.request = request; + } + + public ResponseEntity addInventory( + @io.swagger.v3.oas.annotations.parameters.RequestBody(description = "Inventory item to add") @Valid @RequestBody InventoryItem body) { + @SuppressWarnings("unused") + String accept = request.getHeader("Accept"); + return new ResponseEntity(HttpStatus.NOT_IMPLEMENTED); + } + + public ResponseEntity> searchInventory( + @Parameter(description = "pass an optional search string for looking up inventory") @Valid @RequestParam(value = "searchString", required = false) String searchString, + @Min(0) @Parameter(description = "number of records to skip for pagination") @Valid @RequestParam(value = "skip", required = true) Integer skip, + @Min(0) @Max(50) @Parameter(description = "maximum number of records to return") @Valid @RequestParam(value = "limit", required = true) Integer limit) { + @SuppressWarnings("unused") + String accept = request.getHeader("Accept"); + return new ResponseEntity>(HttpStatus.NOT_IMPLEMENTED); + } + + public String getme(String language) { + return language; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/InventoryItem.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/InventoryItem.java new file mode 100644 index 000000000..b52f7bbc9 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/InventoryItem.java @@ -0,0 +1,184 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app1; + +import java.util.Objects; +import java.util.UUID; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +import org.springframework.validation.annotation.Validated; + +/** + * InventoryItem + */ +@Validated +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2019-07-08T09:37:36.546Z[GMT]") +public class InventoryItem { + @JsonProperty("id") + private UUID id = null; + + @JsonProperty("name") + private String name = null; + + @JsonProperty("releaseDate") + private String releaseDate = null; + + @JsonProperty("manufacturer") + private Manufacturer manufacturer = null; + + public InventoryItem id(UUID id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @return id + **/ + @Schema(example = "d290f1ee-6c54-4b01-90e6-d701748f0851", required = true) + @NotNull + + @Valid + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public InventoryItem name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * + * @return name + **/ + @Schema(example = "Widget Adapter", required = true) + @NotNull + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public InventoryItem releaseDate(String releaseDate) { + this.releaseDate = releaseDate; + return this; + } + + /** + * Get releaseDate + * + * @return releaseDate + **/ + @Schema(example = "2016-08-29T09:12:33.001Z", required = true) + @NotNull + + public String getReleaseDate() { + return releaseDate; + } + + public void setReleaseDate(String releaseDate) { + this.releaseDate = releaseDate; + } + + public InventoryItem manufacturer(Manufacturer manufacturer) { + this.manufacturer = manufacturer; + return this; + } + + /** + * Get manufacturer + * + * @return manufacturer + **/ + @Schema(required = true) + @NotNull + + @Valid + public Manufacturer getManufacturer() { + return manufacturer; + } + + public void setManufacturer(Manufacturer manufacturer) { + this.manufacturer = manufacturer; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InventoryItem inventoryItem = (InventoryItem) o; + return Objects.equals(this.id, inventoryItem.id) && + Objects.equals(this.name, inventoryItem.name) && + Objects.equals(this.releaseDate, inventoryItem.releaseDate) && + Objects.equals(this.manufacturer, inventoryItem.manufacturer); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, releaseDate, manufacturer); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InventoryItem {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" releaseDate: ").append(toIndentedString(releaseDate)).append("\n"); + sb.append(" manufacturer: ").append(toIndentedString(manufacturer)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ItemController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ItemController.java new file mode 100644 index 000000000..42270a6cc --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ItemController.java @@ -0,0 +1,68 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app1; + +import java.net.URI; +import java.time.Instant; +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +import javax.validation.Valid; +import javax.validation.constraints.Size; + +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.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.servlet.support.ServletUriComponentsBuilder; + +@RestController +@Tag(name = "items") +public class ItemController { + + @GetMapping("/items") + public List showItems(@RequestParam("cusID") @Size(min = 4, max = 6) final String customerID, + @Size(min = 4, max = 6) int toto, + @Parameter(name = "start", in = ParameterIn.QUERY, required = false, schema = @Schema(type = "string", format = "date-time", required = false, example = "1970-01-01T00:00:00.000Z")) @RequestParam(value = "start", required = false) Instant startDate, + @Parameter(name = "filterIds", in = ParameterIn.QUERY, array = @ArraySchema(schema = @Schema(type = "string")), explode = Explode.FALSE) @RequestParam(required = false) List filterIds) { + return new ArrayList(); + } + + @PostMapping("/items") + public ResponseEntity addItem(@Valid @RequestBody final ItemLightDTO itemDTO) { + final URI location = ServletUriComponentsBuilder.fromCurrentRequest().path("/{id}") + .buildAndExpand(UUID.randomUUID()).toUri(); + return ResponseEntity.created(location).build(); + } + +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ItemDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ItemDTO.java new file mode 100644 index 000000000..0d45893be --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ItemDTO.java @@ -0,0 +1,130 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app1; + +import java.io.Serializable; + +/** + * @author bnasslahsen + */ +public class ItemDTO implements Serializable { + + /** + * serialVersionUID of type long + */ + private static final long serialVersionUID = 1L; + + /** + * itemID of type String + */ + private String itemID; + + /** + * description of type String + */ + private String description; + + /** + * price of type int + */ + private int price; + + @Deprecated + private int deprecatedPrice; + + /** + * + */ + public ItemDTO() { + } + + /** + * @param description description + * @param price price + */ + public ItemDTO(final String description, final int price) { + this.description = description; + this.price = price; + } + + /** + * @param itemID itemID + * @param description description + * @param price price + */ + public ItemDTO(final String itemID, final String description, final int price) { + this.itemID = itemID; + this.description = description; + this.price = price; + } + + /** + * @return + */ + public String getDescription() { + return description; + } + + /** + * @param description description + */ + public void setDescription(final String description) { + this.description = description; + } + + /** + * @return + */ + public String getItemID() { + return itemID; + } + + /** + * @param itemID itemID + */ + public void setItemID(final String itemID) { + this.itemID = itemID; + } + + /** + * @return + */ + public int getPrice() { + return price; + } + + /** + * @param price price + */ + public void setPrice(final int price) { + this.price = price; + } + + public int getDeprecatedPrice() { + return deprecatedPrice; + } + + public void setDeprecatedPrice(int deprecatedPrice) { + this.deprecatedPrice = deprecatedPrice; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ItemLightDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ItemLightDTO.java new file mode 100644 index 000000000..e066712a9 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/ItemLightDTO.java @@ -0,0 +1,97 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app1; + +import java.io.Serializable; + +/** + * @author bnasslahsen + */ +public class ItemLightDTO implements Serializable { + + /** + * serialVersionUID of type long + */ + private static final long serialVersionUID = 1L; + + /** + * description of type String + */ + private String description; + + /** + * price of type int + */ + private int price; + + @Deprecated + private int deprecatedPrice; + + /** + * + */ + public ItemLightDTO() { + } + + public ItemLightDTO(String description, int price) { + super(); + this.description = description; + this.price = price; + } + + /** + * @return + */ + public String getDescription() { + return description; + } + + /** + * @param description description + */ + public void setDescription(final String description) { + this.description = description; + } + + /** + * @return + */ + public int getPrice() { + return price; + } + + /** + * @param price price + */ + public void setPrice(final int price) { + this.price = price; + } + + public int getDeprecatedPrice() { + return deprecatedPrice; + } + + public void setDeprecatedPrice(int deprecatedPrice) { + this.deprecatedPrice = deprecatedPrice; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/Manufacturer.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/Manufacturer.java new file mode 100644 index 000000000..c558545ad --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/Manufacturer.java @@ -0,0 +1,152 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app1; + +import java.util.Objects; + +import javax.validation.constraints.NotNull; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +import org.springframework.validation.annotation.Validated; + + +/** + * Manufacturer + */ +@Validated +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2019-07-08T09:37:36.546Z[GMT]") +public class Manufacturer { + @JsonProperty("name") + private String name = null; + + @JsonProperty("homePage") + private String homePage = null; + + @JsonProperty("phone") + private String phone = null; + + public Manufacturer name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * + * @return name + **/ + @Schema(example = "ACME Corporation", required = true) + @NotNull + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Manufacturer homePage(String homePage) { + this.homePage = homePage; + return this; + } + + /** + * Get homePage + * + * @return homePage + **/ + @Schema(example = "https://www.acme-corp.com") + + public String getHomePage() { + return homePage; + } + + public void setHomePage(String homePage) { + this.homePage = homePage; + } + + public Manufacturer phone(String phone) { + this.phone = phone; + return this; + } + + /** + * Get phone + * + * @return phone + **/ + @Schema(example = "408-867-5309") + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Manufacturer manufacturer = (Manufacturer) o; + return Objects.equals(this.name, manufacturer.name) && + Objects.equals(this.homePage, manufacturer.homePage) && + Objects.equals(this.phone, manufacturer.phone); + } + + @Override + public int hashCode() { + return Objects.hash(name, homePage, phone); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Manufacturer {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" homePage: ").append(toIndentedString(homePage)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/PeopleRestService.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/PeopleRestService.java new file mode 100644 index 000000000..234876951 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/PeopleRestService.java @@ -0,0 +1,111 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app1; + +import java.net.URI; +import java.util.Collection; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; + +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.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.v3.oas.annotations.tags.Tag; + +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.servlet.support.ServletUriComponentsBuilder; + +@RestController +@Tag(name = "people") +public class PeopleRestService { + private Map people = new ConcurrentHashMap<>(); + + @GetMapping(value = "/people", produces = MediaType.APPLICATION_JSON_VALUE) + @Operation(description = "List all people", responses = { + @ApiResponse(content = @Content(array = @ArraySchema(schema = @Schema(implementation = PersonDTO.class))), responseCode = "200") }) + public Collection getPeople() { + return people.values(); + } + + @Operation(description = "Find person by e-mail", responses = { + @ApiResponse(content = @Content(schema = @Schema(implementation = PersonDTO.class)), responseCode = "200"), + @ApiResponse(responseCode = "404", description = "Person with such e-mail doesn't exists") }) + @GetMapping(value = "/{email}", produces = MediaType.APPLICATION_JSON_VALUE) + public PersonDTO findPerson( + @Parameter(description = "E-Mail address to lookup for", required = true) @PathVariable("email") final String email) { + + final PersonDTO person = people.get(email); + + if (person == null) { + throw new RuntimeException("Person with such e-mail doesn't exists"); + } + + return person; + } + + @PostMapping(value = "/{email}", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + @Operation(description = "Create new person", responses = { + @ApiResponse(content = @Content(schema = @Schema(implementation = PersonDTO.class), mediaType = MediaType.APPLICATION_JSON_VALUE), headers = @Header(name = "Location"), responseCode = "201"), + @ApiResponse(responseCode = "409", description = "Person with such e-mail already exists") }) + public ResponseEntity addPerson( + @Parameter(description = "E-Mail", required = true) @PathVariable("email") final String email, + @Parameter(description = "First Name", required = true) @RequestParam("firstName") final String firstName, + @Parameter(description = "Last Name", required = true) @RequestParam("lastName") final String lastName) { + + final PersonDTO person = people.get(email); + + if (person != null) { + return ResponseEntity.status(HttpStatus.CONFLICT).body("Person with such e-mail already exists"); + } + + people.put(email, new PersonDTO(email, firstName, lastName)); + final URI location = ServletUriComponentsBuilder.fromCurrentRequest().path("/{id}") + .buildAndExpand(UUID.randomUUID()).toUri(); + return ResponseEntity.created(location).build(); + } + + @DeleteMapping(value = "/{email}") + @Operation(description = "Delete existing person", responses = { + @ApiResponse(responseCode = "204", description = "Person has been deleted"), + @ApiResponse(responseCode = "404", description = "Person with such e-mail doesn't exists") }) + public ResponseEntity deletePerson( + @Parameter(description = "E-Mail address to lookup for", required = true) @PathVariable("email") final String email) { + if (people.remove(email) == null) { + throw new RuntimeException("Person with such e-mail doesn't exists"); + } + return ResponseEntity.noContent().build(); + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/PersonDTO.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/PersonDTO.java new file mode 100644 index 000000000..9b9651edf --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/PersonDTO.java @@ -0,0 +1,64 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app1; + +public class PersonDTO { + private String email; + + private String firstName; + + private String lastName; + + public PersonDTO() { + } + + public PersonDTO(final String email, final String firstName, final String lastName) { + this.email = email; + this.firstName = firstName; + this.lastName = lastName; + } + + public String getEmail() { + return email; + } + + public void setEmail(final String email) { + this.email = email; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(final String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(final String lastName) { + this.lastName = lastName; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/SpringDocApp1Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/SpringDocApp1Test.java new file mode 100644 index 000000000..645801e3c --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app1/SpringDocApp1Test.java @@ -0,0 +1,50 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app1; + +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.info.License; +import io.swagger.v3.oas.models.security.SecurityScheme; +import test.org.springdoc.api.v31.AbstractSpringDocV31Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.test.context.TestPropertySource; + +@TestPropertySource(properties = {"springdoc.default-produces-media-type=application/json", "prop.toto=tea"}) +public class SpringDocApp1Test extends AbstractSpringDocV31Test { + + @SpringBootApplication + static class SpringDocTestApp { + @Bean + public OpenAPI customOpenAPI() { + return new OpenAPI() + .components(new Components().addSecuritySchemes("basicScheme", + new SecurityScheme().type(SecurityScheme.Type.HTTP).scheme("basic"))) + .info(new Info().title("SpringShop API").version("v0") + .license(new License().name("Apache 2.0").url("http://springdoc.org"))); + } + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/SpringDocApp2Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/SpringDocApp2Test.java new file mode 100644 index 000000000..4c93c2eeb --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/SpringDocApp2Test.java @@ -0,0 +1,50 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app2; + +import io.swagger.v3.oas.models.Components; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.info.License; +import io.swagger.v3.oas.models.security.SecurityScheme; +import test.org.springdoc.api.v31.AbstractSpringDocV31Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; + +public class SpringDocApp2Test extends AbstractSpringDocV31Test { + + @SpringBootApplication + static class SpringDocTestApp { + @Bean + public OpenAPI customOpenAPI() { + return new OpenAPI() + .components(new Components().addSecuritySchemes("basicScheme", + new SecurityScheme().type(SecurityScheme.Type.HTTP).scheme("basic"))) + .info(new Info().title("Petstore API").version("v0").description( + "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.") + .termsOfService("http://swagger.io/terms/") + .license(new License().name("Apache 2.0").url("http://springdoc.org"))); + } + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/ApiUtil.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/ApiUtil.java similarity index 53% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/ApiUtil.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/ApiUtil.java index 92cfb81ec..a56adda93 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/ApiUtil.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/ApiUtil.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app2.api; +package test.org.springdoc.api.v31.app2.api; import java.io.IOException; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/ExceptionTranslator.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/ExceptionTranslator.java similarity index 60% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/ExceptionTranslator.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/ExceptionTranslator.java index 84305383e..a001480cf 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app2/api/ExceptionTranslator.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/ExceptionTranslator.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app2.api; +package test.org.springdoc.api.v31.app2.api; import java.util.Map; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/HomeController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/HomeController.java new file mode 100644 index 000000000..90deb5f1d --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/HomeController.java @@ -0,0 +1,46 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app2.api; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; + +import static org.springdoc.core.Constants.SWAGGER_UI_PATH; +import static org.springframework.util.AntPathMatcher.DEFAULT_PATH_SEPARATOR; +import static org.springframework.web.servlet.view.UrlBasedViewResolver.REDIRECT_URL_PREFIX; + +/** + * Home redirection to swagger api documentation + */ +@Controller +public class HomeController { + + @Value(SWAGGER_UI_PATH) + private String swaggerUiPath; + + @GetMapping(DEFAULT_PATH_SEPARATOR) + public String index() { + return REDIRECT_URL_PREFIX + swaggerUiPath; + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/pet/PetApi.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/PetApi.java similarity index 90% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/pet/PetApi.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/PetApi.java index 43cfae804..b4d2e1017 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/pet/PetApi.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/PetApi.java @@ -1,18 +1,22 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ @@ -21,7 +25,7 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -package test.org.springdoc.api.app68.api.pet; +package test.org.springdoc.api.v31.app2.api; import java.util.List; @@ -42,8 +46,8 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.security.SecurityScheme; import io.swagger.v3.oas.annotations.tags.Tag; -import test.org.springdoc.api.app68.model.ModelApiResponse; -import test.org.springdoc.api.app68.model.Pet; +import test.org.springdoc.api.v31.app2.model.ModelApiResponse; +import test.org.springdoc.api.v31.app2.model.Pet; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; @@ -65,7 +69,7 @@ @ResponseBody public interface PetApi { - default test.org.springdoc.api.app68.api.pet.PetApiDelegate getDelegate() { + default PetApiDelegate getDelegate() { return new PetApiDelegate() { }; } diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiController.java new file mode 100644 index 000000000..af05b0fa0 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiController.java @@ -0,0 +1,48 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app2.api; + +import java.util.Optional; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; + +@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") + +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/}") +public class PetApiController implements PetApi { + + private final PetApiDelegate delegate; + + public PetApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) PetApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() { + }); + } + + @Override + public PetApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/pet/PetApiDelegate.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiDelegate.java similarity index 79% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/pet/PetApiDelegate.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiDelegate.java index f57549c41..3879558f7 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/pet/PetApiDelegate.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiDelegate.java @@ -1,31 +1,34 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app105.api.pet; +package test.org.springdoc.api.v31.app2.api; import java.util.List; import java.util.Optional; import javax.validation.Valid; -import test.org.springdoc.api.app105.api.ApiUtil; -import test.org.springdoc.api.app105.model.ModelApiResponse; -import test.org.springdoc.api.app105.model.Pet; +import test.org.springdoc.api.v31.app2.model.ModelApiResponse; +import test.org.springdoc.api.v31.app2.model.Pet; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiDelegateImpl.java new file mode 100644 index 000000000..0cf27890a --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/PetApiDelegateImpl.java @@ -0,0 +1,31 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app2.api; + +import org.springframework.stereotype.Service; + +@Service +public class PetApiDelegateImpl implements PetApiDelegate { + + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApi.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApi.java new file mode 100644 index 000000000..6d9ae191c --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApi.java @@ -0,0 +1,109 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (3.0.0). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package test.org.springdoc.api.v31.app2.api; + +import java.util.Map; + +import javax.validation.Valid; +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +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.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import test.org.springdoc.api.v31.app2.model.Order; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.ResponseBody; + +@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") + +@Tag(name = "store", description = "the store API") +public interface StoreApi { + + default StoreApiDelegate getDelegate() { + return new StoreApiDelegate() { + }; + } + + @Operation(summary = "Delete purchase order by ID", tags = { "store" }) + @ApiResponses(value = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") }) + @DeleteMapping(value = "/store/order/{orderId}") + @ResponseBody + default ResponseEntity deleteOrder( + @Parameter(description = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId) { + return getDelegate().deleteOrder(orderId); + } + + @Operation(summary = "Returns pet inventories by status", description = "Returns a map of status codes to quantities", security = { + @SecurityRequirement(name = "api_key") }, tags = { "store" }) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Map.class)))) }) + @GetMapping(value = "/store/inventory", produces = { "application/json" }) + @ResponseBody + default ResponseEntity> getInventory() { + return getDelegate().getInventory(); + } + + @Operation(summary = "Find purchase order by ID", tags = { "store" }) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), + @ApiResponse(responseCode = "404", description = "Order not found") }) + @GetMapping(value = "/store/order/{orderId}", produces = { "application/xml", "application/json" }) + @ResponseBody + default ResponseEntity getOrderById( + @Min(1L) @Max(5L) @Parameter(description = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId) { + return getDelegate().getOrderById(orderId); + } + + @Operation(summary = "Place an order for a pet", tags = { "store" }) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "successful operation", content = @Content(schema = @Schema(implementation = Order.class))), + @ApiResponse(responseCode = "400", description = "Invalid Order") }) + @PostMapping(value = "/store/order", produces = { "application/xml", "application/json" }, consumes = { + "application/json" }) + @ResponseBody + default ResponseEntity placeOrder( + @Parameter(description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order order) { + return getDelegate().placeOrder(order); + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiController.java new file mode 100644 index 000000000..0b9172fc9 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiController.java @@ -0,0 +1,48 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app2.api; + +import java.util.Optional; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; + +@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") + +@Controller +@RequestMapping("${openapi.openAPIPetstore.base-path:/}") +public class StoreApiController implements StoreApi { + + private final StoreApiDelegate delegate; + + public StoreApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) StoreApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() { + }); + } + + @Override + public StoreApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/store/StoreApiDelegate.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiDelegate.java similarity index 72% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/store/StoreApiDelegate.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiDelegate.java index d37166e6a..be7c9877b 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/api/store/StoreApiDelegate.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiDelegate.java @@ -1,28 +1,31 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app68.api.store; +package test.org.springdoc.api.v31.app2.api; import java.util.Map; import java.util.Optional; -import test.org.springdoc.api.app68.api.ApiUtil; -import test.org.springdoc.api.app68.model.Order; +import test.org.springdoc.api.v31.app2.model.Order; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiDelegateImpl.java new file mode 100644 index 000000000..386e009d4 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/StoreApiDelegateImpl.java @@ -0,0 +1,31 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app2.api; + +import org.springframework.stereotype.Service; + +@Service +public class StoreApiDelegateImpl implements StoreApiDelegate { + + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/user/UserApi.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/UserApi.java similarity index 87% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/user/UserApi.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/UserApi.java index e12f1ca6b..1bdb8241e 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/user/UserApi.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/UserApi.java @@ -1,18 +1,22 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ @@ -21,7 +25,7 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -package test.org.springdoc.api.app105.api.user; +package test.org.springdoc.api.v31.app2.api; import java.util.List; @@ -35,7 +39,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; -import test.org.springdoc.api.app105.model.User; +import test.org.springdoc.api.v31.app2.model.User; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiController.java new file mode 100644 index 000000000..67574959a --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiController.java @@ -0,0 +1,50 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app2.api; + +import java.util.Optional; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +@javax.annotation.Generated(value = "org.springdoc.demo.app2.codegen.languages.SpringCodegen", date = "2019-07-11T00:09:29.839+02:00[Europe/Paris]") + +@Controller +@ResponseBody +@RequestMapping("${openapi.openAPIPetstore.base-path:/}") +public class UserApiController implements UserApi { + + private final UserApiDelegate delegate; + + public UserApiController(@org.springframework.beans.factory.annotation.Autowired(required = false) UserApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() { + }); + } + + @Override + public UserApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/user/UserApiDelegate.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiDelegate.java similarity index 77% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/user/UserApiDelegate.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiDelegate.java index 542c67087..f713954ae 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/api/user/UserApiDelegate.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiDelegate.java @@ -1,28 +1,31 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app105.api.user; +package test.org.springdoc.api.v31.app2.api; import java.util.List; import java.util.Optional; -import test.org.springdoc.api.app105.api.ApiUtil; -import test.org.springdoc.api.app105.model.User; +import test.org.springdoc.api.v31.app2.model.User; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiDelegateImpl.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiDelegateImpl.java new file mode 100644 index 000000000..87ca95ec4 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/api/UserApiDelegateImpl.java @@ -0,0 +1,31 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app2.api; + +import org.springframework.stereotype.Service; + +@Service +public class UserApiDelegateImpl implements UserApiDelegate { + + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/Body.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/Body.java similarity index 65% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/Body.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/Body.java index f60340164..d3c7eba3a 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/Body.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/Body.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app105.model; +package test.org.springdoc.api.v31.app2.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/Body1.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/Body1.java similarity index 68% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/Body1.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/Body1.java index 599ec662e..cc2cf64bc 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/Body1.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/Body1.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app105.model; +package test.org.springdoc.api.v31.app2.model; import java.io.File; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/Category.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/Category.java similarity index 61% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/Category.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/Category.java index d131574f9..d5b088052 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/Category.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/Category.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app68.model; +package test.org.springdoc.api.v31.app2.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/ModelApiResponse.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/ModelApiResponse.java similarity index 69% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/ModelApiResponse.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/ModelApiResponse.java index 521ecb8e6..7b7c67099 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/ModelApiResponse.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/ModelApiResponse.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app68.model; +package test.org.springdoc.api.v31.app2.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/Order.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/Order.java similarity index 82% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/Order.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/Order.java index e338e2fce..e6e508334 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/Order.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/Order.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app105.model; +package test.org.springdoc.api.v31.app2.model; import java.util.Date; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/Pet.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/Pet.java similarity index 84% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/Pet.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/Pet.java index a4c821fb8..62bdc0db8 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app105/model/Pet.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/Pet.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app105.model; +package test.org.springdoc.api.v31.app2.model; import java.util.ArrayList; import java.util.List; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/Tag.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/Tag.java similarity index 61% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/Tag.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/Tag.java index 585aec5db..3a0a2704d 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/Tag.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/Tag.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app68.model; +package test.org.springdoc.api.v31.app2.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/User.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/User.java similarity index 83% rename from springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/User.java rename to springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/User.java index 0e3f8c6e2..10aa9715e 100644 --- a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app68/model/User.java +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app2/model/User.java @@ -1,22 +1,26 @@ /* * - * * Copyright 2019-2020 the original author or authors. * * - * * Licensed under the Apache License, Version 2.0 (the "License"); - * * you may not use this file except in compliance with the License. - * * You may obtain a copy of the License at + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * * * - * * https://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. * */ -package test.org.springdoc.api.app68.model; +package test.org.springdoc.api.v31.app2.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app4/HelloController.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app4/HelloController.java new file mode 100644 index 000000000..0e7a8b017 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app4/HelloController.java @@ -0,0 +1,37 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app4; + +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HelloController { + + @PostMapping(value = "/values/data") + TrackerData list(TrackerData toto) { + return toto; + + } + +} diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app4/SpringDocApp4Test.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app4/SpringDocApp4Test.java new file mode 100644 index 000000000..cfc085544 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app4/SpringDocApp4Test.java @@ -0,0 +1,42 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app4; + +import io.swagger.v3.core.jackson.TypeNameResolver; +import org.junit.jupiter.api.AfterAll; +import test.org.springdoc.api.v31.AbstractSpringDocV31Test; + +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.test.context.TestPropertySource; + +@TestPropertySource(properties = "springdoc.use-fqn=true") +public class SpringDocApp4Test extends AbstractSpringDocV31Test { + + @SpringBootApplication + static class SpringDocTestApp {} + + @AfterAll + static void restore(){ + TypeNameResolver.std.setUseFqn(false); + } +} \ No newline at end of file diff --git a/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app4/TrackerData.java b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app4/TrackerData.java new file mode 100644 index 000000000..9ae6c8dd6 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/v31/app4/TrackerData.java @@ -0,0 +1,44 @@ +/* + * + * * + * * * + * * * * Copyright 2019-2022 the original author or authors. + * * * * + * * * * Licensed under the Apache License, Version 2.0 (the "License"); + * * * * you may not use this file except in compliance with the License. + * * * * You may obtain a copy of the License at + * * * * + * * * * https://www.apache.org/licenses/LICENSE-2.0 + * * * * + * * * * Unless required by applicable law or agreed to in writing, software + * * * * distributed under the License is distributed on an "AS IS" BASIS, + * * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * * * * See the License for the specific language governing permissions and + * * * * limitations under the License. + * * * + * * + * + */ + +package test.org.springdoc.api.v31.app4; + +import java.time.Instant; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +public class TrackerData { + + @Schema(name = "trackerId", type = "string", required = true, example = "the-tracker-id") + @JsonProperty("trackerId") + String trackerId; + + @Schema(name = "timestamp", type = "string", format = "date-time", required = true, example = "2018-01-01T00:00:00Z") + @JsonProperty("timestamp") + Instant timestamp; + + @Schema(name = "value", type = "number", format = "double", description = "The data value", required = true, example = "19.0") + @JsonProperty("value") + Double value; + +} diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app1.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app1.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app1.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app1.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app10.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app10.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app10.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app10.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app100.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app100.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app100.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app100.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app101.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app101.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app101.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app101.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app102.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app102.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app102.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app102.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app103.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app103.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app103.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app103.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app104.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app104.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app104.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app104.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app105-1.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app105-1.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app105-1.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app105-1.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app105-2.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app105-2.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app105-2.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app105-2.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app105-3.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app105-3.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app105-3.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app105-3.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app105-4.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app105-4.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app105-4.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app105-4.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app106.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app106.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app106.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app106.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app107.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app107.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app107.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app107.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app108.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app108.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app108.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app108.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app109.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app109.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app109.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app109.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app11.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app11.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app11.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app11.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app110.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app110.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app110.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app110.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app111.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app111.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app111.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app111.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app112.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app112.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app112.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app112.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app113.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app113.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app113.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app113.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app114.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app114.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app114.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app114.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app115.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app115.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app115.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app115.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app116.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app116.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app116.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app116.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app117.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app117.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app117.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app117.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app118.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app118.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app118.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app118.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app119.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app119.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app119.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app119.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app12.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app12.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app12.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app12.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app120.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app120.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app120.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app120.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app121.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app121.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app121.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app121.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app122.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app122.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app122.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app122.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app123.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app123.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app123.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app123.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app124.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app124.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app124.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app124.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app125.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app125.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app125.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app125.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app126.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app126.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app126.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app126.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app128.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app128.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app128.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app128.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app129.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app129.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app129.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app129.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app13.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app13.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app13.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app13.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app130.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app130.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app130.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app130.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app131.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app131.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app131.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app131.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app132.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app132.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app132.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app132.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app133.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app133.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app133.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app133.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app134-1.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app134-1.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app134-1.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app134-1.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app134-2.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app134-2.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app134-2.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app134-2.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app134-3.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app134-3.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app134-3.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app134-3.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app134-4.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app134-4.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app134-4.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app134-4.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app134-5.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app134-5.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app134-5.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app134-5.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app135.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app135.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app135.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app135.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app136.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app136.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app136.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app136.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app137.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app137.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app137.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app137.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app138.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app138.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app138.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app138.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app139.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app139.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app139.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app139.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app14.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app14.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app14.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app14.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app140.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app140.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app140.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app140.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app141.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app141.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app141.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app141.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app142.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app142.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app142.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app142.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app143.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app143.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app143.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app143.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app144.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app144.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app144.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app144.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app145.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app145.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app145.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app145.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app146-1.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app146-1.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app146-1.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app146-1.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app146-2.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app146-2.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app146-2.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app146-2.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app147-1.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app147-1.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app147-1.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app147-1.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app147-2.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app147-2.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app147-2.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app147-2.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app148-1.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app148-1.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app148-1.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app148-1.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app148-2.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app148-2.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app148-2.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app148-2.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app149.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app149.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app149.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app149.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app15.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app15.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app15.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app15.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app150.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app150.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app150.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app150.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app151.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app151.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app151.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app151.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app152.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app152.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app152.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app152.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app153.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app153.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app153.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app153.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app154.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app154.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app154.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app154.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app155.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app155.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app155.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app155.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app156.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app156.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app156.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app156.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app157.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app157.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app157.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app157.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app158.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app158.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app158.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app158.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app159.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app159.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app159.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app159.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app160-1.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app160-1.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app160-1.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app160-1.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app160.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app160.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app160.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app160.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app161.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app161.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app161.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app161.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app162.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app162.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app162.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app162.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app163.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app163.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app163.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app163.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app164.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app164.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app164.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app164.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app165.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app165.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app165.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app165.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app166.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app166.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app166.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app166.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app167.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app167.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app167.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app167.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app168.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app168.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app168.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app168.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app169.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app169.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app169.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app169.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app17.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app17.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app17.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app17.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app170.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app170.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app170.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app170.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app171-en-GB.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app171-en-GB.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app171-en-GB.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app171-en-GB.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app171-en-US.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app171-en-US.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app171-en-US.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app171-en-US.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app171-fr-FR.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app171-fr-FR.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app171-fr-FR.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app171-fr-FR.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app172.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app172.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app172.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app172.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app173.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app173.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app173.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app173.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app174.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app174.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app174.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app174.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app175.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app175.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app175.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app175.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app176.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app176.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app176.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app176.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app177-1.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app177-1.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app177-1.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app177-1.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app177-2.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app177-2.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app177-2.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app177-2.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app177-3.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app177-3.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app177-3.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app177-3.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app177.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app177.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app177.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app177.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app178-1.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app178-1.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app178-1.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app178-1.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app178-2.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app178-2.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app178-2.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app178-2.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app178-3.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app178-3.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app178-3.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app178-3.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app178.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app178.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app178.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app178.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app179.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app179.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app179.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app179.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app18.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app18.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app18.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app18.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app180.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app180.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app180.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app180.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app181.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app181.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app181.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app181.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app182.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app182.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app182.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app182.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app183.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app183.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app183.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app183.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app184-1.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app184-1.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app184-1.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app184-1.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app184-2.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app184-2.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app184-2.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app184-2.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app184-3.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app184-3.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app184-3.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app184-3.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app184.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app184.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app184.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app184.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app185.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app185.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app185.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app185.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app19.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app19.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app19.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app19.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app2.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app2.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app2.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app2.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app20.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app20.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app20.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app20.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app21.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app21.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app21.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app21.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app22.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app22.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app22.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app22.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app23.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app23.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app23.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app23.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app24.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app24.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app24.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app24.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app25.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app25.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app25.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app25.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app26.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app26.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app26.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app26.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app27.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app27.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app27.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app27.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app28.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app28.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app28.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app28.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app29.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app29.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app29.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app29.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app30.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app30.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app30.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app30.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app31.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app31.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app31.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app31.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app32.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app32.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app32.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app32.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app33.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app33.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app33.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app33.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app34.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app34.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app34.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app34.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app35.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app35.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app35.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app35.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app36.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app36.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app36.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app36.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app37.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app37.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app37.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app37.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app38.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app38.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app38.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app38.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app39.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app39.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app39.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app39.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app4.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app4.json similarity index 93% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app4.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app4.json index 1f8469847..8aa24f233 100644 --- a/springdoc-openapi-webmvc-core/src/test/resources/results/app4.json +++ b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app4.json @@ -23,7 +23,7 @@ "in": "query", "required": true, "schema": { - "$ref": "#/components/schemas/test.org.springdoc.api.app4.TrackerData" + "$ref": "#/components/schemas/test.org.springdoc.api.v30.app4.TrackerData" } } ], @@ -33,7 +33,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/test.org.springdoc.api.app4.TrackerData" + "$ref": "#/components/schemas/test.org.springdoc.api.v30.app4.TrackerData" } } } @@ -44,7 +44,7 @@ }, "components": { "schemas": { - "test.org.springdoc.api.app4.TrackerData": { + "test.org.springdoc.api.v30.app4.TrackerData": { "required": [ "timestamp", "trackerId", diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app40.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app40.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app40.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app40.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app41.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app41.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app41.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app41.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app42.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app42.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app42.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app42.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app43.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app43.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app43.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app43.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app44.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app44.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app44.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app44.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app45.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app45.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app45.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app45.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app46.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app46.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app46.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app46.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app47.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app47.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app47.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app47.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app48.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app48.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app48.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app48.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app49.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app49.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app49.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app49.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app50.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app50.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app50.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app50.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app51.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app51.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app51.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app51.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app52.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app52.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app52.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app52.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app53.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app53.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app53.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app53.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app54.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app54.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app54.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app54.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app55.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app55.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app55.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app55.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app56.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app56.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app56.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app56.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app57.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app57.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app57.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app57.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app58.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app58.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app58.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app58.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app59.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app59.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app59.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app59.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app6.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app6.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app6.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app6.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app60.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app60.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app60.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app60.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app61.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app61.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app61.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app61.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app62.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app62.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app62.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app62.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app63.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app63.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app63.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app63.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app64.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app64.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app64.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app64.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app65.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app65.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app65.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app65.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app66.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app66.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app66.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app66.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app67.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app67.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app67.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app67.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app68-1.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app68-1.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app68-1.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app68-1.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app68-2.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app68-2.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app68-2.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app68-2.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app68-3.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app68-3.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app68-3.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app68-3.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app68-4.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app68-4.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app68-4.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app68-4.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app69.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app69.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app69.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app69.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app7.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app7.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app7.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app7.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app70.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app70.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app70.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app70.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app71.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app71.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app71.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app71.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app73.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app73.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app73.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app73.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app74.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app74.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app74.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app74.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app75.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app75.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app75.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app75.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app76.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app76.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app76.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app76.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app77.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app77.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app77.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app77.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app78.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app78.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app78.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app78.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app79.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app79.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app79.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app79.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app8.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app8.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app8.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app8.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app80.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app80.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app80.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app80.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app82.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app82.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app82.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app82.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app83.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app83.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app83.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app83.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app84.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app84.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app84.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app84.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app85.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app85.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app85.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app85.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app86.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app86.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app86.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app86.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app87.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app87.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app87.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app87.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app88.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app88.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app88.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app88.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app89.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app89.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app89.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app89.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app9.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app9.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app9.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app9.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app90.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app90.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app90.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app90.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app91.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app91.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app91.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app91.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app92.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app92.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app92.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app92.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app93.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app93.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app93.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app93.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app94.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app94.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app94.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app94.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app95.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app95.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app95.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app95.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app96.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app96.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app96.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app96.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app97.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app97.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app97.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app97.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app98.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app98.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app98.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app98.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/app99.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app99.json similarity index 100% rename from springdoc-openapi-webmvc-core/src/test/resources/results/app99.json rename to springdoc-openapi-webmvc-core/src/test/resources/results/3.0.1/app99.json diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/3.1.0/app1.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.1.0/app1.json new file mode 100644 index 000000000..0275059fa --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/resources/results/3.1.0/app1.json @@ -0,0 +1,582 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "SpringShop API", + "license": { + "name": "Apache 2.0", + "url": "http://springdoc.org" + }, + "version": "v0" + }, + "servers": [ + { + "url": "http://localhost", + "description": "Generated server url" + } + ], + "tags": [ + { + "name": "inventory" + }, + { + "name": "people" + }, + { + "name": "tea" + }, + { + "name": "items" + } + ], + "paths": { + "/{email}": { + "get": { + "tags": [ + "people" + ], + "description": "Find person by e-mail", + "operationId": "findPerson", + "parameters": [ + { + "name": "email", + "in": "path", + "description": "E-Mail address to lookup for", + "required": true, + "schema": {} + } + ], + "responses": { + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorMessage" + } + } + } + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersonDTO" + } + } + } + }, + "404": { + "description": "Person with such e-mail doesn't exists", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersonDTO" + } + } + } + } + } + }, + "post": { + "tags": [ + "people" + ], + "description": "Create new person", + "operationId": "addPerson", + "parameters": [ + { + "name": "email", + "in": "path", + "description": "E-Mail", + "required": true, + "schema": {} + }, + { + "name": "firstName", + "in": "query", + "description": "First Name", + "required": true, + "schema": {} + }, + { + "name": "lastName", + "in": "query", + "description": "Last Name", + "required": true, + "schema": {} + } + ], + "responses": { + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorMessage" + } + } + } + }, + "201": { + "description": "Created", + "headers": { + "Location": { + "style": "simple", + "schema": {} + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersonDTO" + } + } + } + }, + "409": { + "description": "Person with such e-mail already exists", + "content": { + "application/json": { + "schema": {} + } + } + } + } + }, + "delete": { + "tags": [ + "people" + ], + "description": "Delete existing person", + "operationId": "deletePerson", + "parameters": [ + { + "name": "email", + "in": "path", + "description": "E-Mail address to lookup for", + "required": true, + "schema": {} + } + ], + "responses": { + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorMessage" + } + } + } + }, + "204": { + "description": "Person has been deleted", + "content": { + "application/json": { + "schema": {} + } + } + }, + "404": { + "description": "Person with such e-mail doesn't exists", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/items": { + "get": { + "tags": [ + "items" + ], + "operationId": "showItems", + "parameters": [ + { + "name": "cusID", + "in": "query", + "required": true, + "schema": { + "maxLength": 6, + "minLength": 4 + } + }, + { + "name": "toto", + "in": "query", + "required": true, + "schema": { + "format": "int32", + "maximum": 6, + "minimum": 4 + } + }, + { + "name": "start", + "in": "query", + "required": false, + "schema": { + "format": "date-time", + "example": "1970-01-01T00:00:00.000Z" + } + }, + { + "name": "filterIds", + "in": "query", + "required": false, + "explode": false, + "schema": { + "items": {} + } + } + ], + "responses": { + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorMessage" + } + } + } + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ItemDTO" + } + } + } + } + } + } + }, + "post": { + "tags": [ + "items" + ], + "operationId": "addItem", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ItemLightDTO" + } + } + }, + "required": true + }, + "responses": { + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorMessage" + } + } + } + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "format": "uri" + } + } + } + } + } + } + }, + "/inventory": { + "get": { + "tags": [ + "developers", + "inventory" + ], + "summary": "By passing in the appropriate options, you can search for available inventory in the system ", + "description": "searches inventory", + "operationId": "searchInventory", + "parameters": [ + { + "name": "searchString", + "in": "query", + "description": "pass an optional search string for looking up inventory", + "required": false, + "schema": {} + }, + { + "name": "skip", + "in": "query", + "description": "number of records to skip for pagination", + "required": true, + "schema": { + "format": "int32", + "minimum": 0 + } + }, + { + "name": "limit", + "in": "query", + "description": "maximum number of records to return", + "required": true, + "schema": { + "format": "int32", + "maximum": 50, + "minimum": 0 + } + } + ], + "responses": { + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorMessage" + } + } + } + }, + "200": { + "description": "search results matching criteria", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/InventoryItem" + } + } + } + } + }, + "400": { + "description": "bad input parameter", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/InventoryItem" + } + } + } + } + } + } + }, + "post": { + "tags": [ + "inventory", + "admins" + ], + "summary": "Adds an item to the system", + "description": "adds an inventory item", + "operationId": "addInventory", + "requestBody": { + "description": "Inventory item to add", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InventoryItem" + } + } + }, + "required": true + }, + "responses": { + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorMessage" + } + } + } + }, + "201": { + "description": "item created" + }, + "400": { + "description": "invalid input, object invalid" + }, + "409": { + "description": "an existing item already exists" + } + } + } + }, + "/people": { + "get": { + "tags": [ + "people" + ], + "description": "List all people", + "operationId": "getPeople", + "responses": { + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorMessage" + } + } + } + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/PersonDTO" + } + } + } + } + } + } + } + }, + "/hello/{numTelco}": { + "get": { + "tags": [ + "tea" + ], + "operationId": "index", + "parameters": [ + { + "name": "numTelco", + "in": "path", + "required": true, + "schema": {} + }, + { + "name": "adresse", + "in": "query", + "required": true, + "schema": {} + } + ], + "responses": { + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorMessage" + } + } + } + }, + "418": { + "description": "I'm a teapot", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + } + }, + "components": { + "schemas": { + "ErrorMessage": { + "properties": { + "id": {}, + "message": {} + } + }, + "PersonDTO": { + "properties": { + "email": {}, + "firstName": {}, + "lastName": {} + } + }, + "ItemLightDTO": { + "properties": { + "description": {}, + "price": { + "format": "int32" + }, + "deprecatedPrice": { + "format": "int32", + "deprecated": true + } + } + }, + "InventoryItem": { + "properties": { + "id": { + "format": "uuid", + "example": "d290f1ee-6c54-4b01-90e6-d701748f0851" + }, + "name": { + "example": "Widget Adapter" + }, + "releaseDate": { + "example": "2016-08-29T09:12:33.001Z" + }, + "manufacturer": { + "$ref": "#/components/schemas/Manufacturer" + } + }, + "required": [ + "id", + "manufacturer", + "name", + "releaseDate" + ] + }, + "Manufacturer": { + "properties": { + "name": { + "example": "ACME Corporation" + }, + "homePage": { + "example": "https://www.acme-corp.com" + }, + "phone": { + "example": "408-867-5309" + } + }, + "required": [ + "name" + ] + }, + "ItemDTO": { + "properties": { + "itemID": {}, + "description": {}, + "price": { + "format": "int32" + }, + "deprecatedPrice": { + "format": "int32", + "deprecated": true + } + } + } + }, + "securitySchemes": { + "basicScheme": { + "type": "http", + "scheme": "basic" + } + } + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/3.1.0/app2.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.1.0/app2.json new file mode 100644 index 000000000..158c799fa --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/resources/results/3.1.0/app2.json @@ -0,0 +1,1104 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Petstore API", + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "termsOfService": "http://swagger.io/terms/", + "license": { + "name": "Apache 2.0", + "url": "http://springdoc.org" + }, + "version": "v0" + }, + "servers": [ + { + "url": "http://localhost", + "description": "Generated server url" + } + ], + "tags": [ + { + "name": "user", + "description": "the user API" + }, + { + "name": "pet", + "description": "the pet API" + }, + { + "name": "store", + "description": "the store API" + } + ], + "paths": { + "/user/{username}": { + "get": { + "tags": [ + "user" + ], + "summary": "Get user by user name", + "operationId": "getUserByName", + "parameters": [ + { + "name": "username", + "in": "path", + "description": "The name that needs to be fetched. Use user1 for testing.", + "required": true, + "schema": {} + } + ], + "responses": { + "400": { + "description": "Invalid username supplied", + "content": { + "*/*": { + "schema": { + "additionalProperties": {} + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/xml": { + "schema": { + "$ref": "#/components/schemas/User" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/xml": { + "schema": { + "$ref": "#/components/schemas/User" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + } + } + }, + "put": { + "tags": [ + "user" + ], + "summary": "Updated user", + "operationId": "updateUser", + "parameters": [ + { + "name": "username", + "in": "path", + "description": "name that need to be deleted", + "required": true, + "schema": {} + } + ], + "requestBody": { + "description": "Updated user object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + }, + "required": true + }, + "responses": { + "400": { + "description": "Invalid user supplied", + "content": { + "*/*": { + "schema": { + "additionalProperties": {} + } + } + } + }, + "404": { + "description": "User not found" + } + } + }, + "delete": { + "tags": [ + "user" + ], + "summary": "Creates list of users with given input array", + "operationId": "deleteUser", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": {} + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "additionalProperties": {} + } + } + } + }, + "200": { + "description": "successful operation" + } + } + } + }, + "/pet": { + "put": { + "tags": [ + "pet" + ], + "summary": "Update an existing pet", + "operationId": "updatePet", + "requestBody": { + "description": "Pet object that needs to be added to the store", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + }, + "required": true + }, + "responses": { + "400": { + "description": "Invalid ID supplied", + "content": { + "*/*": { + "schema": { + "additionalProperties": {} + } + } + } + }, + "404": { + "description": "Pet not found" + }, + "405": { + "description": "Validation exception" + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ] + }, + "post": { + "tags": [ + "pet" + ], + "summary": "Add a new pet to the store", + "operationId": "addPet", + "requestBody": { + "description": "Pet object that needs to be added to the store", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + }, + "required": true + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "additionalProperties": {} + } + } + } + }, + "405": { + "description": "Invalid input" + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ] + } + }, + "/user": { + "post": { + "tags": [ + "user" + ], + "summary": "Create user", + "operationId": "createUser", + "requestBody": { + "description": "Created user object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + }, + "required": true + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "additionalProperties": {} + } + } + } + }, + "200": { + "description": "successful operation" + } + } + } + }, + "/user/createWithList": { + "post": { + "tags": [ + "user" + ], + "summary": "Creates list of users with given input array", + "operationId": "createUsersWithListInput", + "requestBody": { + "description": "List of user object", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "required": true + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "additionalProperties": {} + } + } + } + }, + "200": { + "description": "successful operation" + } + } + } + }, + "/user/createWithArray": { + "post": { + "tags": [ + "user" + ], + "summary": "Creates list of users with given input array", + "operationId": "createUsersWithArrayInput", + "requestBody": { + "description": "List of user object", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "required": true + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "additionalProperties": {} + } + } + } + }, + "200": { + "description": "successful operation" + } + } + } + }, + "/store/order": { + "post": { + "tags": [ + "store" + ], + "summary": "Place an order for a pet", + "operationId": "placeOrder", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + }, + "required": true + }, + "responses": { + "400": { + "description": "Invalid Order", + "content": { + "*/*": { + "schema": { + "additionalProperties": {} + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Order" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + } + } + } + } + }, + "/pet/{petId}": { + "get": { + "tags": [ + "pet" + ], + "summary": "Find pet by ID", + "description": "Returns a single pet", + "operationId": "getPetById", + "parameters": [ + { + "name": "petId", + "in": "path", + "description": "ID of pet to return", + "required": true, + "schema": { + "format": "int64" + } + } + ], + "responses": { + "400": { + "description": "Invalid ID supplied", + "content": { + "*/*": { + "schema": { + "additionalProperties": {} + } + } + } + }, + "404": { + "description": "Pet not found", + "content": { + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + }, + "post": { + "tags": [ + "pet" + ], + "summary": "Updates a pet in the store with form data", + "operationId": "updatePetWithForm", + "parameters": [ + { + "name": "petId", + "in": "path", + "description": "ID of pet that needs to be updated", + "required": true, + "schema": { + "format": "int64" + } + }, + { + "name": "name", + "in": "query", + "description": "Updated name of the pet", + "required": false, + "schema": {} + }, + { + "name": "status", + "in": "query", + "description": "Updated status of the pet", + "required": false, + "schema": {} + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "additionalProperties": {} + } + } + } + }, + "405": { + "description": "Invalid input" + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ] + }, + "delete": { + "tags": [ + "pet" + ], + "summary": "Deletes a pet", + "operationId": "deletePet", + "parameters": [ + { + "name": "petId", + "in": "path", + "description": "Pet id to delete", + "required": true, + "schema": { + "format": "int64" + } + }, + { + "name": "api_key", + "in": "header", + "required": false, + "schema": {} + } + ], + "responses": { + "400": { + "description": "Invalid ID supplied", + "content": { + "*/*": { + "schema": { + "additionalProperties": {} + } + } + } + }, + "404": { + "description": "Pet not found" + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ] + } + }, + "/pet/{petId}/uploadImage": { + "post": { + "tags": [ + "pet" + ], + "summary": "uploads an image", + "operationId": "uploadFile", + "parameters": [ + { + "name": "petId", + "in": "path", + "description": "ID of pet to update", + "required": true, + "schema": { + "format": "int64" + } + }, + { + "name": "additionalMetadata", + "in": "query", + "description": "Additional data to pass to server", + "required": false, + "schema": {} + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "properties": { + "file": { + "format": "binary", + "description": "file detail" + } + }, + "required": [ + "file" + ] + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "additionalProperties": {} + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModelApiResponse" + } + } + } + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ] + } + }, + "/user/logout": { + "get": { + "tags": [ + "user" + ], + "summary": "Logs out current logged in user session", + "operationId": "logoutUser", + "responses": { + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "additionalProperties": {} + } + } + } + }, + "200": { + "description": "successful operation" + } + } + } + }, + "/user/login": { + "get": { + "tags": [ + "user" + ], + "summary": "Logs user into the system", + "operationId": "loginUser", + "parameters": [ + { + "name": "username", + "in": "query", + "description": "The user name for login", + "required": true, + "schema": {} + }, + { + "name": "password", + "in": "query", + "description": "The password for login in clear text", + "required": true, + "schema": {} + } + ], + "responses": { + "400": { + "description": "Invalid username/password supplied", + "content": { + "*/*": { + "schema": { + "additionalProperties": {} + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/xml": { + "schema": {} + }, + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/store/order/{orderId}": { + "get": { + "tags": [ + "store" + ], + "summary": "Find purchase order by ID", + "operationId": "getOrderById", + "parameters": [ + { + "name": "orderId", + "in": "path", + "description": "ID of pet that needs to be fetched", + "required": true, + "schema": { + "format": "int64", + "maximum": 5, + "minimum": 1 + } + } + ], + "responses": { + "400": { + "description": "Invalid ID supplied", + "content": { + "*/*": { + "schema": { + "additionalProperties": {} + } + } + } + }, + "404": { + "description": "Order not found", + "content": { + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Order" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/xml": { + "schema": { + "$ref": "#/components/schemas/Order" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + } + } + } + }, + "delete": { + "tags": [ + "store" + ], + "summary": "Delete purchase order by ID", + "operationId": "deleteOrder", + "parameters": [ + { + "name": "orderId", + "in": "path", + "description": "ID of the order that needs to be deleted", + "required": true, + "schema": {} + } + ], + "responses": { + "400": { + "description": "Invalid ID supplied", + "content": { + "*/*": { + "schema": { + "additionalProperties": {} + } + } + } + }, + "404": { + "description": "Order not found" + } + } + } + }, + "/store/inventory": { + "get": { + "tags": [ + "store" + ], + "summary": "Returns pet inventories by status", + "description": "Returns a map of status codes to quantities", + "operationId": "getInventory", + "responses": { + "400": { + "description": "Bad Request", + "content": { + "*/*": { + "schema": { + "additionalProperties": {} + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/json": { + "schema": { + "items": {} + } + } + } + } + }, + "security": [ + { + "api_key": [] + } + ] + } + }, + "/pet/findByTags": { + "get": { + "tags": [ + "pet" + ], + "summary": "Finds Pets by tags", + "description": "Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + "operationId": "findPetsByTags", + "parameters": [ + { + "name": "tags", + "in": "query", + "description": "Tags to filter by", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "400": { + "description": "Invalid tag value", + "content": { + "*/*": { + "schema": { + "additionalProperties": {} + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/xml": { + "schema": { + "items": { + "$ref": "#/components/schemas/Pet" + } + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Pet" + } + } + } + } + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ] + } + }, + "/pet/findByStatus": { + "get": { + "tags": [ + "pet" + ], + "summary": "Finds Pets by status", + "description": "Multiple status values can be provided with comma separated strings", + "operationId": "findPetsByStatus", + "parameters": [ + { + "name": "status", + "in": "query", + "description": "Status values that need to be considered for filter", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "400": { + "description": "Invalid status value", + "content": { + "*/*": { + "schema": { + "additionalProperties": {} + } + } + } + }, + "200": { + "description": "successful operation", + "content": { + "application/xml": { + "schema": { + "items": { + "$ref": "#/components/schemas/Pet" + } + } + }, + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/Pet" + } + } + } + } + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ] + } + } + }, + "components": { + "schemas": { + "User": { + "properties": { + "id": { + "format": "int64" + }, + "username": {}, + "firstName": {}, + "lastName": {}, + "email": {}, + "password": {}, + "phone": {}, + "userStatus": { + "format": "int32", + "description": "User Status" + } + } + }, + "Category": { + "properties": { + "id": { + "format": "int64" + }, + "name": {} + } + }, + "Pet": { + "properties": { + "id": { + "format": "int64" + }, + "category": { + "$ref": "#/components/schemas/Category" + }, + "name": { + "example": "doggie" + }, + "photoUrls": { + "items": {} + }, + "tags": { + "items": { + "$ref": "#/components/schemas/Tag" + } + }, + "status": { + "description": "pet status in the store", + "enum": [ + "available", + "pending", + "sold" + ] + } + }, + "required": [ + "name", + "photoUrls" + ] + }, + "Tag": { + "properties": { + "id": { + "format": "int64" + }, + "name": {} + } + }, + "Order": { + "properties": { + "complete": {}, + "id": { + "format": "int64" + }, + "petId": { + "format": "int64" + }, + "quantity": { + "format": "int32" + }, + "shipDate": { + "format": "date-time" + }, + "status": { + "description": "Order Status" + } + } + }, + "ModelApiResponse": { + "properties": { + "code": { + "format": "int32" + }, + "type": {}, + "message": {} + } + } + }, + "securitySchemes": { + "basicScheme": { + "type": "http", + "scheme": "basic" + }, + "petstore_auth": { + "type": "oauth2", + "flows": { + "implicit": { + "authorizationUrl": "http://petstore.swagger.io/oauth/dialog", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + } + } + } + } +} diff --git a/springdoc-openapi-webmvc-core/src/test/resources/results/3.1.0/app4.json b/springdoc-openapi-webmvc-core/src/test/resources/results/3.1.0/app4.json new file mode 100644 index 000000000..5c70d7107 --- /dev/null +++ b/springdoc-openapi-webmvc-core/src/test/resources/results/3.1.0/app4.json @@ -0,0 +1,70 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "OpenAPI definition", + "version": "v0" + }, + "servers": [ + { + "url": "http://localhost", + "description": "Generated server url" + } + ], + "paths": { + "/values/data": { + "post": { + "tags": [ + "hello-controller" + ], + "operationId": "list", + "parameters": [ + { + "name": "toto", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/test.org.springdoc.api.v31.app4.TrackerData" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/test.org.springdoc.api.v31.app4.TrackerData" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "test.org.springdoc.api.v31.app4.TrackerData": { + "properties": { + "trackerId": { + "example": "the-tracker-id" + }, + "timestamp": { + "format": "date-time", + "example": "2018-01-01T00:00:00Z" + }, + "value": { + "format": "double", + "description": "The data value", + "example": 19.0 + } + }, + "required": [ + "timestamp", + "trackerId", + "value" + ] + } + } + } +}